Sub topic 5
Entering Dates and Times
This chapter assumes you can select cells, type and commit an entry with Enter, and know that Excel decides whether an entry is text, a number, or a formula. Here you will see how Excel reads dates and times, how to type them reliably, and what goes wrong.
Dates and times are numbers
Excel stores a date as a serial number: the count of days since January 1, 1900. January 1, 2025 is stored as 45658. A time is stored as a fraction of a day, so 12:00 PM is 0.5 and 6:00 AM is 0.25. A date with a time adds the two, for example 45658.75 is January 1, 2025 at 6:00 PM.
Because dates are numbers, you can add and subtract them. If A1 holds a start date and B1 holds an end date, =B1-A1 gives the days between them.
Typing dates that Excel recognizes
When you type an entry that matches a date pattern, Excel converts it to a date. It right-aligns the entry and applies a date format. Text stays left-aligned, so alignment is a quick check.
| You type | Excel stores | Notes |
|---|---|---|
| 3/15/2025 | March 15, 2025 | Order of month and day follows your Windows regional settings |
| 15-Mar-2025 | March 15, 2025 | Unambiguous in any region |
| 15 Mar | March 15 of the current year | The year is filled in for you |
| Mar 2025 | March 1, 2025 | The day defaults to 1 |
| 2025-03-15 | March 15, 2025 | The ISO form is read reliably |
The ambiguous form is the main risk. With US settings, 3/4/2025 is March 4. With many European settings, it is April 3. When a file will be shared across regions, type the month as a word or use the ISO form.
Two-digit years are also interpreted. By default, 00 to 29 become 2000 to 2029, and 30 to 99 become 1930 to 1999. Type four digits to avoid surprises.
Shortcuts for today
- Ctrl+; enters today's date as a fixed value.
- Ctrl+Shift+; enters the current time as a fixed value.
=TODAY()and=NOW()are formulas that update every time the workbook recalculates, so they do not keep a date for the record.
Typing times
Type hours and minutes separated by a colon, such as 14:30. Excel treats this as a 24-hour time. For a 12-hour clock, add a space and AM or PM: 2:30 PM. Without AM or PM, Excel assumes AM. Add seconds with a second colon: 14:30:15.
To enter a date and time together, separate them with a space: 3/15/2025 14:30.
Common errors
- Text instead of a date. An entry such as
31/12/2025in a US-setting workbook cannot be a date because there is no month 31. Excel keeps it as left-aligned text, and date math on it fails. - A date shows as a number such as 45731. The cell has a General or Number format. Apply a date format and the value displays correctly. The stored value does not change.
- Cell shows
########. The column is too narrow for the formatted date or time. Widen the column. - Dates before 1900. Excel cannot treat them as dates, so they are stored as text.
Seeing the result
Try this in a blank sheet. Type 3/15/2025 in A1 and 3/20/2025 in B1, then enter the formula below in C1.
=B1-A1C1 should show 5. If it shows a date instead, Excel copied a date format into the cell. Change C1's format to General.
Exercise
In a workbook with US regional settings, you type 13/2/2025 in a cell and the entry stays left-aligned. Why, and how would you enter February 13, 2025 so it is stored as a real date?
Show answer
With US settings Excel reads the entry as month/day/year, and there is no month 13, so it is kept as text. Type 2/13/2025, or use an unambiguous form such as 13-Feb-2025 or 2025-02-13.
Exercise
What number does Excel store for 6:00 PM, and why?
Show answer
It stores 0.75. Times are fractions of a day, and 6:00 PM is 18 of 24 hours, which is three quarters of a day.