Count number of days between

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

Guest

I am new to using Access and have created a form that has two time/date
fields in the format DD/MM/YYYY.
Is there a way to add a third field that will calculate the number of days
between the two dates once both date fields are filled in?
 
I am new to using Access and have created a form that has two time/date
fields in the format DD/MM/YYYY.
Is there a way to add a third field that will calculate the number of days
between the two dates once both date fields are filled in?

The actual formatting of the 2 date fields is irrelevant.
Look up the DateDiff() function in VBA help:

=DateDiff("d",[DateFieldA],[DateFieldB])

This calculated value need not be saved. Whenever you need to know the
difference between the 2 dates, simply use this expression to
calculate it.
 
Thank you.

fredg said:
I am new to using Access and have created a form that has two time/date
fields in the format DD/MM/YYYY.
Is there a way to add a third field that will calculate the number of days
between the two dates once both date fields are filled in?

The actual formatting of the 2 date fields is irrelevant.
Look up the DateDiff() function in VBA help:

=DateDiff("d",[DateFieldA],[DateFieldB])

This calculated value need not be saved. Whenever you need to know the
difference between the 2 dates, simply use this expression to
calculate it.
 
Back
Top