• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Form logic

SELECT Tasks.* FROM Tasks WHERE (((Int([Due Date]))=Int(Date())));

Here is the logic. How would like to have this show information for 7days from due date?
 
I believe you would want to add or subtract 7 from INT([Due Date]), depending on which way you are wanting to go.
 
Hi ,

To add to what Luke has posted , the INT usage may not be needed , at least around Date() , since the system date which is returned by the Date() function has only a date component , without any additional time component.

The INT function is normally used around a date + time combination , to remove the time component and leave only the date component ; thus if you have a date + time combination , as is returned by the Now() function , as in :

4/18/2014 01:51:13 PM

then using the INT function around this will return only the date component , as in :

4/18/2014

Even if you format this using the mm/dd/yyyy hh:mm:ss format code , you will see :

4/18/2014 00:00:00

Thus , unless your Due Date is not a strict date , but has an additional time component to it , you can simplify your statement to :

SELECT Tasks.* FROM Tasks WHERE (Int([Due Date])=Date());

or even :

SELECT Tasks.* FROM Tasks WHERE ([Due Date]=Date());

Narayan
 
Back
Top