DateDiff() function returns the difference between two dates. The unit for the difference is specified as a string ( "s" for second, "m" for month, "yyyy" for year, and so on). : DateDiff « Date Functions « VBA / Excel / Access / Word
DateDiff() function returns the difference between two dates. The unit for the difference is specified as a string ( "s" for second, "m" for month, "yyyy" for year, and so on).
Sub dateDiffDemo()
Debug.Print DateDiff("s", Now, "10/10/03")
End Sub