Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Better to use one field or two for date and time
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00100374
Message ID:
00101105
Views:
64
Sylvia,

While it is customary to use separate controls for entering date and time (because of the variety of formats) - it is desireable to store date and time in a datetime field for the following reasons:

1) it is more compact - a datetime field requires 8 bytes while a date field alone requires 8 bytes.
2) you can perform calculations on a datetime field which you can't do if the time is stored in a character field.

Take the time to program your form to split a datetime variable up for your calendar and time classes and put it back together for storage. You'll be glad you did.
-cjh
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform