Calculation Issues

Why Excel Time Values Change Between General and Time Formats

Rana GarciaRana Garcia Nov 20, 2026 869 views

Question details

Understand why Excel time comparisons or differences may appear inconsistent when values are displayed in General or time format.

Why Excel Time Values Change Between General and Time Formats
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.
Before you start

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.

Solution 1Recommended

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.

1
Check the underlying values

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.

2
Compare rounded values

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.

3
Calculate a rounded difference

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.

Compare date and time values rounded to the nearest second
Compare time of day only: If the dates should be ignored, use MOD(A2,1) and MOD(B2,1) in place of A2 and B2 in the comparison formula. Values close to midnight can round across the day boundary.
Free Microsoft Office alternative

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.

Compare date and time values with rounding formulas in WPS SpreadsheetsOpen and edit Microsoft Excel XLS and XLSX filesUse a familiar interface for a smoother transition from ExcelWork with spreadsheets in a lightweight office suite
microsoft office alternative - wps office

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.