XL: Converting Hours in Decimal Form to HH:MM:SS Format

Last reviewed: February 2, 1998
Article ID: Q72578
The information in this article applies to:
  • Microsoft Excel for Windows, versions 2.x, 3.x, 4.x, 5.0. 5.0c
  • Microsoft Excel for Windows 95, versions 7.0, 7.0a
  • Microsoft Excel 97 for Windows
  • Microsoft Excel for the Macintosh, versions 3.0, 4.0, 5.0, 5.0a
  • Microsoft Excel 98 Macintosh Edition

SUMMARY

If you want to convert hours displayed in decimal form so that they can be displayed in a time format such as hh:mm:ss (for example, to convert 2.1 to 2:06:00), use the following the appropriate procedure for your version Microsoft Excel.

MORE INFORMATION

Microsoft Excel Versions 5.0 and Later

To convert the number, follow these steps:

  1. Use the following formula to convert the number (n) to a serial number

          =n/24
    

    where n is any decimal number representing hours.

  2. On the Format menu, click Cells, and then click the Number tab.

  3. Under Category, select Time, and under Format Codes, select the number format you want.

Microsoft Excel Versions 4.0 and Earlier

To convert the number, follow these steps:

  1. Use the following formula to convert the number (n) to a serial number

          =n/24
    

    where n is any decimal number representing hours.

  2. On the Format menu, click Number, and select the desired number format (for example, select hh:mm:ss).

NOTE: You can also use these procedures to convert from time values to decimal values. To do this, start from a time value, convert it to a decimal format, and then multiply by 24 to get the decimal representing the time value.

REFERENCES

"User's Guide," version 5.0, pages 111, 209-218 "Function Reference," version 4.0, pages 433-434 "Function Reference," version 3.0, pages 236-237


Additional query words: 98 97 7.00 2.0 2.00 2.01 2.1 2.10 2.2 2.20 2.21
3.00 4.0 4.00 5.00 4.00a XL98 XL97 XL7 XL5 XL4 XL3
Keywords : xlformat
Version : WINDOWS:2.0,3.0,4.0,5.0,7.0,97; MACINTOSH:3.0,4.0,5.0,98
Platform : MACINTOSH WINDOWS
Issue type : kbinfo


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: February 2, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.