Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date manipulation
Message
 
To
09/11/2000 11:00:47
General information
Forum:
Visual Basic
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00439700
Message ID:
00439910
Views:
12
>Hi all,
>
>What is the best way to store/manipulate dates with VB/Access applications so that regional settings won't interfere.
>
>Should I store date values as character and retrieve with date literals and format function or is there another alternative?
>
>Also ... is it the regional settings that reverts a date from october 12, 2000 to december 10, 2000?

Always remember that VB internally stores the date as mm/dd/yy (the US format).

You should always work with this format in mind (cdate, dateadd, datediff, ...).

When you need to display or when users need to input dates, always use a mask that has 4 digits for the year part (yyyy/mm/dd). This way, you should avoid all problems related to dates.

For input, you should also consider using the DateTimePicker control of VB6.
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform