Count number of days between

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?
 
F

fredg

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.
 
G

Guest

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.
 

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

Top