Calculate number of days between a start date and an end date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a query that asks me for a start date and an end date. I would like
to show these two dates on a report (which I have done) along with the report
calculating the number of days between those two dates.

Can anyone assist?
 
Use the datediff function

Create another field in the report, and in the ControlSource Property of the
field write
=DateDiff("d",[FieldStartName],[FieldEndDateName])

That will return the different in days.
Read help on the subject to see the different options you have using datediff
 
In the query design view add to the Field row of the grid type Start: and
copy the part of your criteria prompting for the start date. You should copy
to make sure it is identical. It would look like --
Start: [Enter start date]
In another column of the Field row do the same for the end date.

The responses will be in the output of the query for use in the report.
 

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

Back
Top