Skip to main content
Question

Find duration between 2 fields with data type (Time of day) ?

  • December 13, 2017
  • 0 replies
  • 37 views

How to find duration when start date field is of type (Time of day) and end date field is of type (time of day). I need to find the total duration between start date and end date in terms of days and hours.

There is not enough information to be able to do that calculation, since we do not know the day of the start and the stop.

You need to record the start date and the start time and the end date and the end time.  That can be done either with 4 fields or two fields of type "date/time".

  • Registered
  • December 13, 2017
ToDays([tod2] - [tod1]) will return a number as fraction of a day. 

ToHours([tod2] - [tod1]) will return the number of integer hours and a decimal representing the fraction of hours.


... assuming that all data entry is done on the same day and does not cross midnight.

I was confused because Raj said "in terms of days and hours.

  • Registered
  • December 13, 2017
I was confused because I answered a question without using JavaScript. Its gonna be a bad day - we have 7 inches of snow coming ...