How do I get the difference between two dates that are entered on.

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

Guest

I have two date inputs on a form and i need to calculate the difference
between the two dates and display it on the same form. I have a code, but
don't know where to put it and have it display the result on the form.
Thanks in advance.
 
I have two date inputs on a form and i need to calculate the difference
between the two dates and display it on the same form. I have a code, but
don't know where to put it and have it display the result on the form.
Thanks in advance.

Put a textbox on the FOrm and set its Control Source property to

=DateDiff("d", [FirstDate], [SecondDate])

to get the difference in days. DateDiff will give you a choice of any
unit from seconds to years - see the online help for details.

John W. Vinson[MVP]
 
Back
Top