Date problem

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
 
D

Duane Hookom

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

Duane Hookom
MS Access MVP
 
I

Ivan Debono

Does it mean that I have to convert it to US format before passing it to
access?

Ivan
 
D

Douglas J. Steele

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
 
I

Ivan Debono

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top