Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Sorry, an Access question
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

United Kingdom
183 Posts

Posted - 10/18/2013 :  10:07:09  Show Profile  Reply with Quote
Please forgive my post here but I have asked on some Access forums and no one replies.
I have always got at least a reply from this forum so thought I would ask here.
I am using an MS Sql Server database for my backend.
In the Access query designer I need to add a criteria on a DateTime field that says if today's date = that of entry date, display the record.
In my field "EntryDate" I have the value "18/10/2013 07:47:26"
What should I enter in the criteria field because if I enter Date(), it does not work.

Thanks for your help.

All the best,


Edited by - Steve2106 on 10/18/2013 10:08:17

Flowing Fount of Yak Knowledge

6065 Posts

Posted - 10/18/2013 :  10:31:20  Show Profile  Reply with Quote
Let's take Access out of the equation because your backend is sql server. Sounds like your data contains datetime values and you need to query for a range of datetimes covering a 24 hour period (today 12:00:00 AM through today 11:59:59 PM)

not sure how to generate this code using access but for sql:
where [EntryDate] >= dateadd(day, datediff(day, 0, getdate()), 0) --today 12:00 AM
and [EntryDate] < dateadd(day, datediff(day, 0, getdate()), 1) --tomorrow 12:00 AM

Be One with the Optimizer
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000