Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Time fields in VFP
Message
From
03/06/1999 12:56:09
 
 
To
03/06/1999 12:28:18
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00226055
Message ID:
00226078
Views:
24
>I see that there no data type to store TIME in vfp. (I know there is DATETIME). I am wondering how others are handling time fields without the date.
>

The TIME() function returns a character string; it's pretty useless on a computational basis. The SECONDS() function returns a numeric number of seconds since midnight; adding that to a datetime set at midnight of an arbitrary day and using
TTOC(tArbDateAtMidnight + nSecondsSinceMidnight,2) will return a character string representing the time, and the number can be used computationally. It's very rare that I have a time in the total absense of a date, so I tend to store a nice, compact, computationally-useful datetime, and the rare cases where I do, it's an elapsed time, so the number of seconds elapsed is most useful there, which can be stored in an appropriately-sized numeric or integer field.

>Thanx for ur comments
>Gnana
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform