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!

Dates and Greater Than / Less Than

Status
Not open for further replies.

chris5g

Programmer
Joined
Aug 21, 2001
Messages
48
Location
US

I'm using a Access to store the dates I need to compare and I want to delete a record that has a creation date prior to the current date.

What is the SQL statement that will do this? I tried to use a string like the one below but it didn't work. If I use > it works but deletes everything.

&quot;DELETE FROM tablename WHERE mydate < &quot; & Date
 
&quot;DELETE FROM tablename WHERE mydate < #&quot; & formatDate(Date()) & &quot;#&quot; Get the Best Answers! faq333-2924
Is this an asp FAQ? faq333-3048

mikewolf@tst-us.com
 
The #date# did the trick,thanks a whole bunch!

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top