.NETGURU
Using dates in Access query
Messages   Related Types
This message was discovered on ASPFriends.com 'ngfx-oledb' list.


Chak
Hello,

I know this is probably off-topic, but i have a
problem with regard to date columns in Access 2000.

I have a table in Access 2000 - let us say table A. In
this i have a date field called 'Date1'. Now, my
regional setting is English (US), which stores date in
MM/DD/YY format. I have a ASP.Net web form, which
gives me a date in DD/MM/YY format (en-GB culture).
This date gets automatically stored in MM/DD/YY format
by Access .

Now. let us say the date is 05/31/2002. If i give a
query in Access, as , 'Select * from A where Date1 =
31/05/2002' (in DD/MM/YY format), i get the proper
result.

But , if the date, is say 06/05/2002. If i give a
query 'Select * from A where Date1 = 05/06/2002' , it
returns null rows .

Any clues on how i can resolve this ?

Regards,

Chakravarthy

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

Reply to this message...
 
    
Alex Dresko
I'm not sure if it matters, but shouldn't you qualify dates in an Access
query like this?

Select * from A where Date1 = #05/06/2002#

Alex Dresko
Three Point Oh!

-----Original Message-----
From: Chak [mailto:Click here to reveal e-mail address]
Sent: Wednesday, May 08, 2002 8:22 AM
To: ngfx-oledb
Subject: [ngfx-oledb] Using dates in Access query

Hello,

I know this is probably off-topic, but i have a
problem with regard to date columns in Access 2000.

I have a table in Access 2000 - let us say table A. In
this i have a date field called 'Date1'. Now, my
regional setting is English (US), which stores date in
MM/DD/YY format. I have a ASP.Net web form, which
gives me a date in DD/MM/YY format (en-GB culture).
This date gets automatically stored in MM/DD/YY format
by Access .

Now. let us say the date is 05/31/2002. If i give a
query in Access, as , 'Select * from A where Date1 =
31/05/2002' (in DD/MM/YY format), i get the proper
result.

But , if the date, is say 06/05/2002. If i give a
query 'Select * from A where Date1 = 05/06/2002' , it
returns null rows .

Any clues on how i can resolve this ?

Regards,

Chakravarthy

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

| [ngfx-oledb] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-oledb.asp = JOIN/QUIT

Reply to this message...
 
    
Karyono
u can use format standard iso to query data or insert
yyyy/MM/dd

-----Original Message-----
From: Chak [mailto:Click here to reveal e-mail address]
Sent: Wednesday, May 08, 2002 7:22 PM
To: ngfx-oledb
Subject: [ngfx-oledb] Using dates in Access query

Hello,

I know this is probably off-topic, but i have a
problem with regard to date columns in Access 2000.

I have a table in Access 2000 - let us say table A. In
this i have a date field called 'Date1'. Now, my
regional setting is English (US), which stores date in
MM/DD/YY format. I have a ASP.Net web form, which
gives me a date in DD/MM/YY format (en-GB culture).
This date gets automatically stored in MM/DD/YY format
by Access .

Now. let us say the date is 05/31/2002. If i give a
query in Access, as , 'Select * from A where Date1 =
31/05/2002' (in DD/MM/YY format), i get the proper
result.

But , if the date, is say 06/05/2002. If i give a
query 'Select * from A where Date1 = 05/06/2002' , it
returns null rows .

Any clues on how i can resolve this ?

Regards,

Chakravarthy

__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

| [ngfx-oledb] member Click here to reveal e-mail address = YOUR ID
| http://www.aspfriends.com/aspfriends/ngfx-oledb.asp = JOIN/QUIT

Reply to this message...
 
 




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification