Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DateTime variables
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00439117
Message ID:
00439132
Views:
14
>What is the correct syntax for extracting the hours and minutes from a datetime variable?
>Thanks.
I think DATETIME() converts values to update a DATETIME field type:
? VARTYPE(DATETIME(2000,11,7,23,18,30)) && returns a "T" data type
DTOC(DATETIME()) && returns a string date "11/18/2000"
TTOC(DATETIME()) && returns a string date and time
_CLIPTEXT=TTOC(DATETIME())
.. returns a character data type
11/07/2000 11:46:27 PM
so ..
cHour=SUBSTR(TTOC(DATETIME()),12,2)
cMinutes=SUBSTR(TTOC(DATETIME()),15,2)
Imagination is more important than knowledge
Previous
Reply
Map
View

Click here to load this message in the networking platform