Date problem

  • Thread starter Thread starter Ivan Debono
  • Start date Start date
I

Ivan Debono

Hi all,

My computer date setting is dd/mm/yyyy. My Access database has SQL Server
compatible syntax switched on. IN my VB app, I pass a date to a sql
statement where the date is for example #03/08/2004#. Access interprets it
as #08/03/2004#, ie mm/dd/yyyy.

Is there a way to avoid this problem??

Thanks,
Ivan
 
SQL syntax will interpret as you have experienced. You can also use a format
like 3-Aug-2004.

Duane Hookom
MS Access MVP
 
Does it mean that I have to convert it to US format before passing it to
access?

Ivan
 
No conversion is required. Access doesn't actually store dates in any
particular format. Rather, it stores them as 8 byte floating point numbers,
where the integer portion represents the date as the number of days relative
to 30 Dec, 1899 (and the decimal portion represents the time as a fraction
of a day)

You might find it useful to read Allen Browne's "International Dates in
Access" at
http://members.iinet.net.au/~allenbrowne/ser-36.html
or what I have at
http://members.rogers.com/douglas.j.steele/SmartAccess.html
 
Thanks. Very interesting reading :)

Douglas J. Steele said:
No conversion is required. Access doesn't actually store dates in any
particular format. Rather, it stores them as 8 byte floating point numbers,
where the integer portion represents the date as the number of days relative
to 30 Dec, 1899 (and the decimal portion represents the time as a fraction
of a day)

You might find it useful to read Allen Browne's "International Dates in
Access" at
http://members.iinet.net.au/~allenbrowne/ser-36.html
or what I have at
http://members.rogers.com/douglas.j.steele/SmartAccess.html
 
Back
Top