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 Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

dateadd not working

Status
Not open for further replies.

souladventurer

Programmer
Joined
Jun 13, 2003
Messages
4
Location
US
Hello,

I have the following SQL in the where statement, I do not receive an error but the query does not return any data.

DATABASE.[DATE BILLED SS] BETWEEN DATEADD("d",-90,DATE()) AND DATEADD("d",-300,DATE())

any suggestions on how to make this work?

Thanks!
 
This may be very simple. I think you have flip flopped the low and high date parameters. Try this:

DATABASE.[DATE BILLED SS] BETWEEN DATEADD("d",-300,DATE()) and DATEADD("d",-90,DATE())

You see the first DateAdd should be the LOW date value and the second DateAdd should be the HIGH date value.



Bob Scriver
Want the best answers? See FAQ181-2886
Nobody believes the official spokesman... but everybody trusts an unidentified source.
Author, Bagdad Bob???

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top