Knowledge Base

Works: Calculating Elapsed Hours, Minutes, and Seconds

Article ID: 118409

Article Last Modified on 11/15/2004


APPLIES TO


This article was previously published under Q118409

SUMMARY

Works can display time of day in several different formats, but the underlying data is always represented as a fractional decimal value, which indicates the percentage of a full day that the time represents. For example, 8 hours is one-third of a 24-hour day, and is represented as .3333333.

MORE INFORMATION

Because time values are stored as a decimal fraction, you can subtract these values like any other decimal number. The functions presented below show how to calculate the elapsed time for any period of LESS THAN 24 hours in hours, minutes, or seconds:

NOTE: In the following functions, END is the finish time and START is the begin time for which you want to find the elapsed time. Format as General the cell or field in which the formulas reside.

Hours

=if(int(END-START + 1), Hour(END-START), Hour(END-START + 1))

Minutes

=if(int(END-START + 1), Minute(END-START), Minute(END-START + 1))

Seconds

=if(int(END-START + 1), Second(END-START), Second(END-START + 1))


Additional query words: 2.00 2.00a 3.00 3.00a 3.00b 4.00 4.00a 4.50 4.50a w_works kbhowto hour minute second time elapsed d_works

Keywords: kbhowto kbinfo KB118409