Applies ToExcel for Microsoft 365 Excel 2024 Excel 2021 Excel 2019 Excel 2016

Here are several ways to convert time units, such as how many hours there are in 5.5 days, how many days there are in 3.45 years, or how many months are between a beginning and an ending date.

To convert from one time unit to another, use the CONVERT function.

Example: Convert between time units

For conversions that involve a year, consider that a year is 365.25 days.

To convert from hours : minutes : seconds format, use the INT function.  

Example: Convert hours from standard time format to a decimal number

To convert from decimal to hours : minutes : seconds format, use the divisor operator (/) together with the TEXT function.

Example: Convert hours from decimal number to the standard time

You can also apply the time format without using the TEXT function to specify the format. To view the number as a time: select the cell and, on the Home tab—in the Number group—click the arrow next to the Number Format box. Then click More Number Formats, click Custom in the Category list, and then click a custom format in the Type box. Keep in mind: if you use both a format applied with the TEXT function and number format, the TEXT function takes precedence.

Need more help?

You can always ask an expert in the Excel Tech Community or get support in Communities.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.