Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieve time from DateTime field ??
Message
From
24/09/1998 05:19:05
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
 
 
To
24/09/1998 05:14:11
Mark Hall
Independent Developer & Voip Specialist
Keston, Kent, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00140265
Message ID:
00140268
Views:
32
>>Are there any functions to retrieve the time part of a DateTime field so that a data bound control can display only the time part and be modified by a user?
>>
>>We can't seem to find any such functions, so help is really appreciated...
>
>Hello again,
>
>I think you have to use the HOUR(), MINUTE() and SEC() functions, so you get something like
>
>? PADL(HOUR( DATETIME()), 2, "0") + ":" + PADL(MINUTE( DATETIME()), 2, "0") + ":" + PADL(SEC( DATETIME()), 2, "0")
>
>pretty horrible eh.

Or even just

? RIGHT( TTOC( DATETIME()), 8)

It depends upon how you want to process the time.
Regards
Mark

Microsoft VFP MCP
Menulib - OO Menus for VFP www.hidb.com/menulib
Previous
Reply
Map
View

Click here to load this message in the networking platform