Skip to main content
Question

Formula Duration in Hours

  • March 7, 2018
  • 0 replies
  • 78 views

I am importing a .csv file with two date columns. The date columns are formatted
Date & Time. 


I need a formula that calculates the number of hours between the two date / time columns but doesn't take into account the minutes. All minutes weather .01 or .59 should be dropped from the formula calculation.

Two examples:

BegDate                 EndDate                       Hours

1/3/2018  8:01       1/13/2018  11:30           243
1/4/2018  8:01       1/15/18  18:15               274

Note: The Date / Time appear in the cells as military time but in the excel Formula bar as AM or PM. Thought you might need to know.

Thanks for any help.
This topic has been closed for replies.

  • Registered
  • March 8, 2018
You could make 2 fields -
Formula Duration type named  [Date Time Duration] = [End DateTime]-[Start DateTime]
then a Formula Numeric Type named [Hours] = Floor(ToHours([Date Time Duration]))