Sub topic 2
Formats change the display, not the value
Assume you can enter formulas, use relative and absolute cell references, and apply number formats from the Format menu. This chapter uses those skills to separate a date’s stored value from the way Sheets displays it.
The stored value and the displayed value
Google Sheets stores a date as a serial number: a count of days from its date system. A time is stored as a fraction of one day. For example, noon is 0.5, because half a day has passed.
The cell may display 11/28/2026, but its underlying value is a number. Formatting changes how that number appears. It does not change the number itself.
=DATE(2026, 11, 28)If you format the result as yyyy-mm-dd, it appears as 2026-11-28. If you format it as mmmm d, yyyy, it appears as November 28, 2026. Both displays represent the same date value.
You can test the stored value by changing the cell format to Format > Number > Number. The date becomes a number such as 46354, depending on Sheets’ date system. Change the format back to a date to restore the familiar display.
flowchart TD
A[Stored serial number] --> B[Date format]
A --> C[Number format]
A --> D[Date and time format]
B --> E[November 28, 2026]
C --> F[46354]
D --> G[November 28, 2026 12:00 PM]Applying date and time formats
Select a cell or range, then choose Format > Number > Custom date and time. You can choose a preset or build a pattern from parts such as:
yyyyfor a four-digit yearmmfor a two-digit monthddfor a two-digit daymmmfor an abbreviated month namehhfor an hourmmfor minutes in a time patternssfor seconds
The meaning of a symbol depends on its position. In a date pattern, mm means month. In a time pattern, it means minutes. Sheets interprets the pattern as a display instruction.
| Format | Example display | Stored value |
|---|---|---|
| `yyyy-mm-dd` | `2026-11-28` | Unchanged date number |
| `mmm d, yyyy` | `Nov 28, 2026` | Unchanged date number |
| `yyyy-mm-dd hh:mm` | `2026-11-28 14:30` | Unchanged date-time number |
Why formatting matters in formulas
Formatting does not turn text into a date. A value that looks like 2026-11-28 may still be text, so date arithmetic can fail or produce unexpected results. A real date can be subtracted from another date:
=B2 - A2The result is a number of days. Format that result as Number, not as a date, so Sheets displays the duration clearly.
A date-time difference also produces days. To display elapsed hours, multiply by 24:
=(B2 - A2) * 24Do not format a long duration as a clock time such as h:mm unless you want the display to wrap after 24 hours. For example, 27 hours may display as 3:00. Use a numeric format for total hours, or use a duration format that preserves elapsed hours.
A reliable checking method
When a date formula behaves unexpectedly:
- Change the input cell to Format > Number > Number.
- Check whether it shows a serial number or remains text.
- Check the spreadsheet locale if text dates parse differently.
- Apply the intended date format only after confirming the value.
Exercise
Cell A2 displays 11/28/2026. How can you check whether it contains a real date rather than text?
Show answer
Change A2 to Format > Number > Number. A real date displays as a serial number. Text remains text or does not behave as a numeric date.