I have some problem with datetime in sql server 2005.
In adp project connected to an sql server 2000 when I refer to a datetime
formatting I use something like this:
select * from aaa where mydate = '" & me!date & "'"
and all is ok.
In adp project connected to an sql server 2005 when I refer to a datetime
formatting I have to use sometime :
select * from aaa where mydate = '" & me!date & "'"
but sometime :
select * from aaa where mydate = '" & format(me!date,"mm/dd/yyyy") & "'"
May be I do something's wrong.
Is there someone who can help me?
Thanks in advance
Marco Dell'Oca
Milan Italy
giorgio rancati - 23 Feb 2006 01:47 GMT
Hi Marco,
you can use the iso format
----
select * from aaa where mydate = '" & format(me!date,"yyyymmdd") & "'"
----
the iso format is indipendent from client and server localization
bye

Signature
Giorgio Rancati
[Office Access MVP]
> I have some problem with datetime in sql server 2005.
>
[quoted text clipped - 22 lines]
> Marco Dell'Oca
> Milan Italy