Sub topic 1
How Sheets stores dates and times
Prerequisites
This chapter assumes you can enter values and formulas in cells, use cell references such as A2 and $A$2, and apply number formats from the Format menu.
How Sheets stores dates and times
Google Sheets stores every date and time as a serial number, which is a count of days from a fixed starting point. Day 0 is 30 December 1899, so 1 January 1900 is stored as 2. The whole-number part of the value is the date. The decimal part is the time of day: 0.5 is noon and 0.25 is 6:00 AM.
Date functions work on these numbers, not on the text you see in the cell.
Formats change the display, not the value
A format controls only how a value appears. Changing a cell from a date format to a number format does not change what is stored.
Checking the stored value
Enter 2026-11-28 in A2. Then enter =A2 in B2 and set B2 to a plain number format. The cell shows 46354, which is the serial number for 28 November 2026.
> Note: Formatting never changes the stored value, so a formula that uses the cell always sees the same number.
Creating dates and times with DATE, TIME, TODAY and NOW
Use these functions to build date and time values from parts instead of typing them:
| Function | Returns | Example |
|---|---|---|
| `DATE(year, month, day)` | A date | `=DATE(2026, 11, 28)` |
| `TIME(hour, minute, second)` | A time of day | `=TIME(14, 30, 0)` |
| `TODAY()` | Today's date | `=TODAY()` |
| `NOW()` | Current date and time | `=NOW()` |
DATE builds the value from numbers, so it works the same in every locale.
Pulling out year, month, day, hour, minute and second
Suppose A2 holds 2026-11-28 14:30:45. These formulas return its parts:
=YEAR(A2) returns 2026
=MONTH(A2) returns 11
=DAY(A2) returns 28
=HOUR(A2) returns 14
=MINUTE(A2) returns 30
=SECOND(A2) returns 45Each result is a plain number, so you can use it in comparisons or in another DATE call.
Exercise
Exercise
Cell A2 contains the date-time 2026-11-28 14:30:45. Which formula returns the hour as a number, and what does it return?
Show answer
=HOUR(A2) returns 14.