Why Excel Time Values Change Between General and Time Formats
Question details
Understand why Excel time comparisons or differences may appear inconsistent when values are displayed in General or time format.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- Comparing imported or calculated date and time values that are displayed as General numbers or as hh:mm:ss.
- Observed behavior
- Values that look identical in time format can produce unexpected comparisons or differences because they contain hidden precision or are stored as text.
Identify the cells containing the original date and time values and check whether they were imported or calculated. Decide whether your comparison should include the date or only the time of day.
Compare date and time values rounded to the nearest second
Use this method when numeric values look identical in time format but differ at hidden decimal places.
Excel stores numeric dates and times as serial numbers, with one day equal to 1 and one second equal to 1/86400. Changing a cell's number format normally changes only its display, not its stored value.
Select the date and time cells, then choose Home > Number Format > General. Use Increase Decimal on the Home tab to reveal more of the displayed numeric value.
In an empty cell, enter =ROUND(A2*86400,0)=ROUND(B2*86400,0), replacing A2 and B2 with your cells. The formula compares the full date and time values rounded to whole seconds.
To subtract the rounded values, enter =(ROUND(A2*86400,0)-ROUND(B2*86400,0))/86400. Select the result and use Home > Number Format > More Number Formats > Custom to apply [h]:mm:ss.

Convert imported date and time text to numeric values
Use this method when imported entries are text rather than Excel date and time numbers.
Work with Date and Time Values in WPS Spreadsheets
WPS Office is a free, lightweight alternative with a familiar spreadsheet interface. Open compatible Excel files and use formulas and number formats to work with date and time values while moving between office suites.

Frequently Asked Questions
Does changing a cell from Time to General alter its value?
Normally, no. Home > Number Format changes how the number is displayed, while the stored value remains the same. General format can reveal a decimal representation that the time format hides.
Why do two cells showing the same time compare as unequal?
The cells may contain different fractions of a second, different dates, or different data types. Check them with ISNUMBER and compare whole-second values using ROUND(A2*86400,0)=ROUND(B2*86400,0).
How can I tell whether an imported time is text?
Enter =ISNUMBER(A2) in an empty cell. If it returns FALSE, try =VALUE(A2); the text must be recognizable under your regional date and time settings.
Why does a time difference show hours beyond 24?
A duration can span more than one day. Select the result and apply the custom number format [h]:mm:ss through Home > Number Format > More Number Formats to show total elapsed hours.




