Dates in format dd/mm/yyyy

G

Gabriel Chavez

I have a date field in my table where I store dates in
spanish format dd/mm/yyyy but when I do a Query Access
convert my date dd/mm/yyyy to mm/dd/yyy.

I saw my regional settings and it's in spanish. I don't
know if I have to change an Access option to work well
with spanish dates or if i will have to use the format
function in every SQL query.

I will apreciate any help with this matter.

Gabriel.
 
K

Ken Snell

ACCESS Jet expects dates to be in mm/dd/yyyy format, regardless of your
local settings. You'll need to use the Format function.
 
?

=?iso-8859-1?Q?Gabriel_Ch=E1vez?=

Thank you Ken, but do you know if an spanish version of
the MS JET exists instead of coding with the format
function every SQL statement?

I will apreciate a lot any clue or suggestion...

Gabriel.
 
J

John Vinson

I have a date field in my table where I store dates in
spanish format dd/mm/yyyy but when I do a Query Access
convert my date dd/mm/yyyy to mm/dd/yyy.

The date value is stored internally as a Double Float number, a count
of days and fractions of a day since midnight, December 30, 1899. The
format (specific or Windows-regional) merely controls what's
displayed, not what's stored!

Literal dates in queries must be in American (mm/dd/yy or mm/dd/yyyy)
format, or an unambiguous format such as dd-mmm-yyyy. The result will
be displayed according to whatever format property is applied to the
query field, or to the Form or Report textbox in which it is
displayed.
 
D

Douglas J. Steele

No. All versions of Access use the same Jet Engine, and therefore have the
same limitation.
 
G

Gabriel Chavez

After trying with some issues I found that I can use
dates in spanish format with the function CDate like this:

Fecha >= CDate('02/01/2003')

This works well. Thanks to all for your answers.
 

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