DateTime Query
Database
2
Posts
1
Posters
0
Views
1
Watching
-
I want to query a table for the previous date. Not sure how to construct the WHERE statement. Thanks,
-
I want to query a table for the previous date. Not sure how to construct the WHERE statement. Thanks,
The answer was; WHERE [TimeStamp]>= Convert(varchar(10), DateADD(DAY, -1, GETDATE()), 101) AND [TimeStamp] < Convert(varchar(10), GETDATE(), 101) This gave the info for the previous day only. Brian