Return a date in the future from a given date

CFP - Jason

Registered User.
Local time
Today, 16:36
Joined
Jun 9, 2003
Messages
54
can anyone explain to me how to use this? i have a date and a frequency and i want to calculate the next event. I am refering to the example on mvps. Where do i put this code and howcan i store it so that i can use a query to find upcoming events. thanks i really need help on this one quick
Jason
 
is that the calc you use when querying, or is that for the field.
on the same note, i already got the intervals to calculate how i want them, so i guess my definitive question is how to build a query that can look for the calculated dates that fall in a range of say a week or 2 weeks etc. thanks greatly
Jason
 
Pat Hartman said:
You don't need to store the calculated date, you can calculate it in the query. For example:

Select ...
From ...
Where YourDate Between Date() + 21 AND Date() + 30;

If your interval is something other than days, you'll need to use the DateAdd() function to add the inteval.

Shouldn't you be using the DateAdd function instead?
I've noticed using

Code:
Date()+30

Returns some unexpected results in comparisions at times.

Jon
 

Users who are viewing this thread

Back
Top Bottom