[AccessD] Determining Regional Date Setting

Gustav Brock gustav at cactus.dk
Wed May 5 02:05:16 CDT 2004


Hi Erwin

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

Well, no and yes, its purpose is to convert "something" to a date
value if at all possible. Of course, different rules must be used for
this. Also, the expression can be of any type other that a string.

What you request is something like

  CDateStr(expression, [requested format])

That would be nice.

/gustav
 

> -----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#.




More information about the AccessD mailing list