Works: Calculating Elapsed Hours, Minutes, and Seconds (118409)



The information in this article applies to:

  • Microsoft Works 2.0
  • Microsoft Works 2.0a
  • Microsoft Works 3.0
  • Microsoft Works 3.0a
  • Microsoft Works 3.0b
  • Microsoft Works 4.5
  • Microsoft Works 4.5a
  • Microsoft Works for Windows 95, version 4.0
  • Microsoft Works for Windows 95, version 4.0 4.0a

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))


Modification Type:MajorLast Reviewed:11/15/2004
Keywords:kbhowto kbinfo KB118409