date prob (1 Viewer)

NickNeville

Registered User.
Local time
Today, 16:48
Joined
May 17, 2009
Messages
119
Could anyone tell me how to keep the date format in VB. I am trying to add a command which will happen after a certain date and enter the date UK style like
13/052012 but it always changes to 05/13/2012 and therefore will not work !

You help appreciated
rgds
Nick
 

jzwp22

Access Hobbyist
Local time
Today, 11:48
Joined
Mar 15, 2008
Messages
2,629
You will want to take a look at Allen Browne's site on how Access deals with dates that are not in the mm/dd/yyyy format.
 

NickNeville

Registered User.
Local time
Today, 16:48
Joined
May 17, 2009
Messages
119
Yes the answer is there, It was a short date and should have been anything but !

many thanks indeed
Rgds
Nick
 

Pat Hartman

Super Moderator
Staff member
Local time
Today, 11:48
Joined
Feb 19, 2002
Messages
43,484
The key to working with dates is to NEVER format them except for printing. As long as you are working with a field or variable defined as a date datatype all will be well. Once you start formatting the date you change it to a string and that's when the interpretation problems start. Internally dates are double precision numbers.

05/29/12 11:21:51 AM = 41058.4735069444
 

Users who are viewing this thread

Top Bottom