p2p.wrox.com Forums

Need to download code?

View our list of code downloads.


  Return to Index  

asp_databases thread: SQL Date Problem


Message #1 by "Mark Irvine" <mark@m...> on Sat, 1 Dec 2001 12:02:47 -0000
Hi,



I have run into a strange problem.  I am passing this date, #10/12/2001#, as

part of an SQL query to an Access2000 database.  However Access interprets

it as #12/10/2001#.  The strange thing is that it does not do this for every

date, only some.  And because the change happens within Access, I can't do

anything before sending it.



Has anyone come across this before?



Mark







Message #2 by Imar Spaanjaars <Imar@S...> on Sat, 01 Dec 2001 13:12:30 +0100
Hi Mark,



Change the date to the following format before you pass it to Access:



YYYY/MM/DD



That way, Access won't change it.



Another way to do this is to substitute the month number for the month 

name, for example feb instead of 02.



HtH



Imar







At 12:02 PM 12/1/2001 +0000, you wrote:

>Hi,

>

>I have run into a strange problem.  I am passing this date, #10/12/2001#, as

>part of an SQL query to an Access2000 database.  However Access interprets

>it as #12/10/2001#.  The strange thing is that it does not do this for every

>date, only some.  And because the change happens within Access, I can't do

>anything before sending it.

>

>Has anyone come across this before?

>

>Mark

>

>





Message #3 by "Mark Irvine" <mark@m...> on Sat, 1 Dec 2001 13:07:10 -0000
Imar,



Many, many thanks for your response.  I did exactly what you first suggested

(yyy/mm/dd) which solved the problem!!



Mark

"Imar Spaanjaars" <Imar@S...> wrote in message

news:125135@a..._databases...

>

> Hi Mark,

>

> Change the date to the following format before you pass it to Access:

>

> YYYY/MM/DD

>

> That way, Access won't change it.

>

> Another way to do this is to substitute the month number for the month

> name, for example feb instead of 02.

>

> HtH

>

> Imar

>

>

>

> At 12:02 PM 12/1/2001 +0000, you wrote:

> >Hi,

> >

> >I have run into a strange problem.  I am passing this date, #10/12/2001#,

as

> >part of an SQL query to an Access2000 database.  However Access

interprets

> >it as #12/10/2001#.  The strange thing is that it does not do this for

every

> >date, only some.  And because the change happens within Access, I can't

do

> >anything before sending it.

> >

> >Has anyone come across this before?

> >

> >Mark

> >

> >

>

>

>

>





Message #4 by "Ken Schaefer" <ken@a...> on Mon, 3 Dec 2001 17:05:33 +1100
www.adopenstatic.com/faq/dateswithaccess.asp



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

From: "Mark Irvine" <mark@m...>

Sent: Saturday, December 01, 2001 11:02 PM

Subject: [asp_databases] SQL Date Problem





: Hi,

:

: I have run into a strange problem.  I am passing this date, #10/12/2001#,

as

: part of an SQL query to an Access2000 database.  However Access interprets

: it as #12/10/2001#.  The strange thing is that it does not do this for

every

: date, only some.  And because the change happens within Access, I can't do

: anything before sending it.

:

: Has anyone come across this before?



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~




  Return to Index