Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Urgent : Date Comparison Problem

Status
Not open for further replies.

RushiShroff

Programmer
Jan 23, 2002
216
IN
I am firing the query
Access 2000,dtfield is DateTime field..

select * from tblnm where dtfield < mm/dd/yyyy

It is not fetching the correct results
where as

select * from tblnm where dtfield > mm/dd/yyyy
works fine.
Also
select * from tblnm where dtfield < now()
works fine.

Just tell me if you know.

Rushi Shroff
 
use this type of query
instead of using dd/mm/yy u can use dd-mmm-yy
because the date type is mostly dipends on system date type so for the safe use dd-mmm-yy format
so try this query
select * from tblnm where dtfield < mmm-dd-yyyy

happy programming
raghu
 
What is this mmm(Triple)?? Rushi Shroff Rushi@emqube.com
&quot;If freedom is short of weapons,we must compensate with willpower.&quot;-Adolf Hitler

 
dd- date
mmm -month format
yyyy - year format
like jan-12-2002,feb-12-2002

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top