Using between dates

  • Thread starter Thread starter stevenphillips63 via AccessMonster.com
  • Start date Start date
S

stevenphillips63 via AccessMonster.com

In criteria I have :
Is not null and between [beginning date]and[ending date]. Is there a way to
capture the elapsed days based on dates entered, so I can use this in another
calculation?
Example beginning date of Jan 1, ending date of Jan 15. So I would need to
know that there are 15 elapsed days.
Thanks, Steve
 
Create a caculated field in your query that uses the DateDiff function

ElapsedDays: DateDiff("d", [beginning date], [ending date])

Note, however, the results will return 14, not 15. If you want to include
the ending date, add 1
 
In criteria I have :
Is not null and between [beginning date]and[ending date]. Is there a way to
capture the elapsed days based on dates entered, so I can use this in another
calculation?
Example beginning date of Jan 1, ending date of Jan 15. So I would need to
know that there are 15 elapsed days.
Thanks, Steve


ElapsedDays:DateDiff("d",[Beginning Date],[Ending Date]) +1

will include the last day.

Make sure the text within the brackets is identical to the bracketed
text in the criteria.
 
Back
Top