UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Date() Returns No Records, Access 2016    
 
   
chimp8471
post Nov 21 2019, 11:59 AM
Post#1



Posts: 598
Joined: 27-March 03



Hi,

Stupid question i am sure

I have a table that i am querying

very simple query one field is called date of entry, i am trying to return only records that are entered today

when i use =date() in the criteria and run it, i get no records returned

What am i doing so wrong please?

Thanks in advance
This post has been edited by chimp8471: Nov 21 2019, 11:59 AM
Go to the top of the page
 
theDBguy
post Nov 21 2019, 12:03 PM
Post#2


UA Moderator
Posts: 78,481
Joined: 19-June 07
From: SunnySandyEggo


Hi. Date fields actually have time components as well. So, if your date fields include times, then using a simple Date() criteria will not match any of them (unless all the times are on midnight). Try using a criteria like Between Date() and Date()+1.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
chimp8471
post Nov 21 2019, 12:15 PM
Post#3



Posts: 598
Joined: 27-March 03



Legend!!

Worked a charm thanks
Go to the top of the page
 
theDBguy
post Nov 21 2019, 12:19 PM
Post#4


UA Moderator
Posts: 78,481
Joined: 19-June 07
From: SunnySandyEggo


Hi. Glad to hear you got it to work. Good luck with your project.

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    11th July 2020 - 12:48 PM