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

less than a particuler date problem

Status
Not open for further replies.

cm80

Technical User
May 3, 2001
85
US
Hi my SQL statement is as follows:

SELECT * FROM event_log WHERE device_id = ABC AND event_time < &quot;9/13/01 1:58:05 PM&quot; ORDER BY event_time DESC

but the results include &quot;9/13/01 1:58:05 PM&quot; and I don't want them to. Is there some other way of doing this when dealing with dates or where am I going wrong

Thanks,
 
sql server stores time in milliseconds.

Try SELECT * FROM event_log WHERE device_id = ABC AND event_time < &quot;9/13/01 1:58:05:000 PM&quot; ORDER BY event_time DESC
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top