469,602 Members | 1,818 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,602 developers. It's quick & easy.

Comparing dates, format trouble

65
How do you compare dates that are in dd/mm/yyyy format?? Al my dates are stored like this but access keeps checking them by mm/dd/yyy format. When access can't convert my dd/mm/yyyy format, it uses the date i stored.
If access can convert it to mm/dd/yyyy format and it still is a legal date it does so.

How do I get around this??

Greetz
Jul 20 '07 #1
2 1975
Lysander
344 Expert 100+
How do you compare dates that are in dd/mm/yyyy format?? Al my dates are stored like this but access keeps checking them by mm/dd/yyy format. When access can't convert my dd/mm/yyyy format, it uses the date i stored.
If access can convert it to mm/dd/yyyy format and it still is a legal date it does so.

How do I get around this??

Greetz
Shoot Bill Gates. I have had this trouble so many times. You need to make sure that the default date format in Windows is dd/mm/yyyy for all users. Also, if you are running a split database, with code and data on different machines, make sure the default date, for all users, on the server, is dd/mm/yyyy. Up to W2K (and I suspect 2003 as well) the default is mm/dd/yyyy and so when you access the database on the server, the account on the server (I think ISUser but not sure) uses the default American dates, rather than British dates.

Since coming across this problem some time ago, I now store my dates in 3 fields, day, month, year, store the month as text (eg sep, oct) and then build the date as datevalue.
Jul 20 '07 #2
Twanne
65
Ok, get me a rifle and a plane to wherever he lives and I'll be on my way :)

But thanx anyway, I'll try it out and see if it works. To bad there isn't a programatorical way around it.

Greetz
Jul 20 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

9 posts views Thread by deko | last post: by
2 posts views Thread by Manny Chohan | last post: by
3 posts views Thread by Bryan | last post: by
5 posts views Thread by JL | last post: by
5 posts views Thread by Kermit Piper | last post: by
3 posts views Thread by Phoe6 | last post: by
reply views Thread by guiromero | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.