Click here to Skip to main content
15,912,329 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi experts,

how to compare to date time with present date time in access by using query?

thanks in advance
Posted

1 solution

You would use the DateDiff operator. It takes three criteria. The first is the units you want the difference to be in (days, months, years, etc.) in the typical format for the units (dd, yyyy, etc.) The next is the date from your table and the last is the current date/time (either Date() for just the date or Now() for the date and time).

Here is a page with more info on this operator:

http://www.techonthenet.com/access/functions/date/datediff.php[^]
 
Share this answer
 
Comments
sandeep nagabhairava 25-Jun-12 8:35am    
thanks Tim :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900