Tuesday, June 24, 2008

Tips: Calculate hours between two dates in Excel

Here is a handy function to calculate the difference between two dates:
  • =DATEDIF(Date1, Date2, Interval) where:
  • interval="m" for number of months
  • interval="d" for number of days
  • interval="y" for number of years
  • For example:
  • =(DATEDIF(today(),A1, "d")-1) *24 is approximately number of hours between today and the date value stored in cell A1.

Reference:

No comments: