Sub topic 10
Dates and Times as Serial Numbers
This chapter assumes you can enter data in cells, write a basic formula such as =A1+B1, and know that a number format changes how a value looks without changing the value. Here you will see what Excel actually stores when you type a date or a time.
Dates are counting numbers
Excel stores a date as a serial number. This is the count of days since a starting point. Under the default 1900 date system, serial number 1 is January 1, 1900. January 1, 2024 is serial number 45292.
A date format turns that number into readable text. If you apply the General format to a date cell, you see the serial number instead.
=DATE(2024,1,1)This formula returns 45292. Excel usually applies a date format to the result automatically. If the cell shows 45292, apply a date format to it.
Times are fractions of a day
A time is the fractional part of a serial number. One full day is 1, so half a day is 0.5. The fraction for noon is 0.5, and the fraction for 6:00 AM is 0.25.
A single number can hold both parts. The value 45292.75 means January 1, 2024 at 6:00 PM.
| Serial value | Meaning |
|---|---|
| 45292 | January 1, 2024, at midnight |
| 45292.5 | January 1, 2024, at 12:00 PM |
| 0.25 | 6:00 AM (the time only) |
Why this makes date math simple
Dates are numbers, so ordinary arithmetic works on them.
=B1-A1gives the number of days between two dates.=A1+30gives the date 30 days later.=A1+TIME(2,0,0)adds two hours.
If the result of a subtraction shows up as a date such as "1/20/1900", the cell has a date format. Change it to General or Number to see the day count.
Converting between text and serials
A date typed as text, such as an imported string, is not a serial number, so you can't do arithmetic with it. DATEVALUE converts it.
=DATEVALUE("2026-11-27")This returns the serial number for November 27, 2026. Apply a date format to see it as a date.
Common errors
- Seeing a number instead of a date. The cell has General or Number format. Apply a date format.
- Seeing a date instead of a number. A formula result inherited a date format. Apply General.
- Dates that won't calculate. The value is text. Convert it with
DATEVALUE, which the later chapter on converting text covers in more depth. - Date system differences. Workbooks can use the 1904 date system, which starts counting from a different date. Copying dates between the two systems shifts them by about four years.
Exercise
Cell A1 contains 45292.5 with the General format. What date and time does it represent under the 1900 date system, and what formula gives the date 10 days later?
Show answer
It represents January 1, 2024 at 12:00 PM, because 45292 is the date and 0.5 is half a day. The formula =A1+10 gives January 11, 2024 at 12:00 PM, since adding 10 adds 10 days.