Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQL Select with Character and Time
Message
From
05/01/1999 15:27:58
 
 
To
05/01/1999 15:16:24
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00172892
Message ID:
00172908
Views:
25
Hiya Ed ---

I looked into it before I posted it as I was unsure about CTOT() but, sure enough, it'll handle "14:22" and the like. The thing is, that the date defaults to 12/31/1899 or something like that but the date is irrelevant in comparing "14:22" to TIME() as CTOT() will evaluate the date the same for both, leaving only the time to be judged.


>
>Are you sure that 'hour' contains full datetime string and not just hour number? I don't claim that I know this 'fact' better than you, just base on UT experience :).
>
>>Hi Ed, Andersen:
>>
>>SELECT * FROM table WHERE CTOT(hour) > CTOT(TIME())
>>
>>This does it.
>>
>>
>>>>
>>>>I have a table that have a field Called HOUR and him data type is caracter.
>>>>
>>>>and i have to do a Select Sql wherer Hour > Time()
>>>>
>>>>how can i do this?
>>>>
>>>>thanks
>>>
>>>Something like this:
>>>nHour=HOUR(datetime())
>>>Select * From MyTable Where MyTable.Hour>nHour
>>>
>>>I guess you will also want to filter by date here, because without it the result does not make much sense.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Previous
Reply
Map
View

Click here to load this message in the networking platform