[AccessD] Determining Regional Date Setting

Erwin Craps - IT Helps Erwin.Craps at ithelps.be
Tue May 4 16:00:20 CDT 2004


To me it's not intelligent, because it uses different rules for same
thing...


 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock
Sent: Tuesday, May 04, 2004 7:02 PM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Determining Regional Date Setting

Hi Erwin

> There is another oddity I Access when using dates...
> I believe its a bug since Access 2K.

> Try this (you all know that u can simulate a american date with 
> #[Date]# ? cdate(#1/12/2004#)-1 this results in 11/01/2004 beeing 1 
> january 2004 ? cdate(#31/12/2004#)-1 this results in 30/12/2004 beeing

> 30 december
> 2004
> ? cdate(#12/31/2004#)-1 this also results in 30/12/2004 beeing 30 
> december 2004 Bizare he?
> Never trust Access with dates.....

> I supose this bug is only in the international versions...

It's not a bug, it's CDate() being intelligent. First attempt is to
check if the expression conforms to a US date. If that fails, it tries
an international (ISO) format or your local settings, then another etc.
- that's why it also understands #2004/01/12#.

/gustav

--
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com



More information about the AccessD mailing list