Excel: Multiply Time Entry to Obtain Decimal Number Equivalent

Last reviewed: November 2, 1994
Article ID: Q60473

SUMMARY

When performing operations on times in Microsoft Excel, multiply the figures by the appropriate amount to obtain decimal values for hours, minutes, or seconds. To obtain hours, multiply the time result by 24; for minutes, by 1440; for seconds, by 86,400.

MORE INFORMATION

Excel handles times as fractions of days in order to facilitate date/time calculation. Numbers entered directly as times (for example, "9:30 AM") are calculated as decimal fractions of 1. Problems may arise when these figures are used in calculations. For example:

  1. Enter "9:30 AM" (without quotation marks) in cell A1.

  2. Enter "10:35 AM" (without quotation marks) in cell A2.

  3. Enter "=A2-A1" (without quotation marks) in cell A3; the number displayed will be 0.04513889.

  4. Format the cell as "h:mm" by choosing Number from the Format menu and selecting "h:mm" from the list. The result will then be displayed as 1:05. However, multiplying this by an hourly pay rate will give unexpected results, since Excel is storing the value as a fraction of a day.

  5. Change the formula in cell A3 to "=(A2-A1)*24" (without quotation marks) and format the cell as "General" by choosing Number from the Format menu and selecting "General" from the list. The number will be displayed as 1.083333; this reflects the accurate figure in decimal hours.

  6. Enter the formula "=(A2-A1)*1440" (without quotation marks) in cell A4. The result, formatted as "General", will be 65 (minutes).

  7. Enter the formula "=(A2-A1)*86400" (without quotation marks) in cell A5. The result, formatted as "General", will be 3900 (seconds).

To restore the figures to an actual time value, divide them by the appropriate increment. Note that times are handled as time since January 1, 1904, (the first date of the Macintosh internal clock); mixing times and actual dates requires handling them accordingly.


KBCategory: kbother
KBSubcategory:

Additional reference words: noupd


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: November 2, 1994
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.