Using between dates

  • Thread starter stevenphillips63 via AccessMonster.com
  • 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
 
G

Guest

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
 
F

fredg

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Default Dates 2
Between . . .And problem 1
criteria 27
User Prompt for Month to find Date Range 3
criteria 1
Calculating Dates 3
Excel Help with dates 2
Complex query 0

Top