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

Creating a report that contains only the last 24 hrs

Status
Not open for further replies.

lenebene

Programmer
Sep 24, 2002
15
US
I a trying to create a report from a table that only contains the last 24 hrs. The format of the date is "09/24/2002 9:01:50 AM". The table contains information from the past 5 months.

Any ideas?
 
The default for date arthimetic is day so you can just add 1 to the date and check, otherwise use the datepart function. DatePart("m", MyDate) 'checks for month

select * from table where mydate <= now()+1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top