SQL query to pull today's transactions

I have an access database that logs history using the =Now() function into a field called TimeStamp.  I'd like a simple query to pull all records with a certain date, but since each record also has a time attached, all my results return blank.

I'm thinking ...

SELECT * from tblHistory WHERE TimeStamp = "02/07/13"

But the recordset returns empty because the underlying data is ...

TimeStamp
02/07/2013 3:58:01 PM
02/07/2013 3:58:15 PM
02/07/2013 3:58:55 PM
02/07/2013 3:59:01 PM
02/07/2013 3:56:30 PM


HELP?!
callstateAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
Dale FyeConnect With a Mentor Commented:
Since it is Access, use:

SELECT * from tblHistory
WHERE DateValue([TimeStamp]) = Date()
0
 
David KrollCommented:
try

select * from tblhistory where convert(varchar, timestamp, 101) = "02/07/13"

EDIT:

I failed to see that you're in access, so you might have to try this:

select * from tblhistory
WHERE timestamp >= #2013-02-07# and Licenses.Entereddate < #2013-02-08#
0
 
callstateAuthor Commented:
Perfect!
0
 
Dale FyeCommented:
BTW,

I would get out of the habit of calling it a [TimeStamp] as that has a very specific meaning in SQL Server.  I use [LastModified]
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.