Why dates confuse people, and why they do not have to
Dates are everywhere in business spreadsheets: invoice dates, due dates, start dates, ticket logs, delivery schedules, payroll periods. They are also the source of some of the most confusing moments in Excel. A formula that should return a number of days suddenly shows 9 January 1900. A sort puts April before January. A lookup refuses to match a date that is clearly there. Almost all of these problems disappear once you understand one simple fact: Excel stores every date as a number.
This lesson is for office workers, analysts, team leads, students and anyone who builds reports with dates in them. In the free lab above you work with the service-ticket log of Kestrel Facility Services, a fictional building-maintenance company. You count how many days each ticket was open, pull out the year, label the month with TEXT and schedule a follow-up visit on the first day of the following month with DATE. This article explains the same steps in more depth, shows the numbers behind the dates and covers the traps that trip up even experienced users.
Everything later in this course, from due dates and working days to timesheets and project schedules, rests on the ideas in this first lesson. Learn how dates are stored and you can calculate with them as confidently as with any other number.
The core concept: dates are serial numbers
In the default date system that Excel for Windows and current versions of Excel for Mac use, the first of January 1900 is day 1, the second of January 1900 is day 2, and every day since then has added one. The first of January 2026 is day 46023. That count is called the serial number of the date. When you type 15/12/2025 or 15 Dec 2025 into a cell, Excel recognises the pattern, stores 46006 and applies a date format so that you see a date instead of the number.
| Date shown | Serial number stored | Note |
|---|---|---|
| 1 Jan 1900 | 1 | Day 1 of the 1900 date system |
| 24 Nov 2025 | 45985 | T-1041 opened |
| 15 Dec 2025 | 46006 | T-1042 opened |
| 1 Jan 2026 | 46023 | The anchor value printed under the lab |
| 6 Jan 2026 | 46028 | T-1042 closed: 46028 − 46006 = 22 |
| 30 Apr 2026 | 46142 | T-1048 closed |
| 15 Dec 2025, 12:00 | 46006.5 | Times are fractions of a day |
You can prove this to yourself in two seconds. Select any date cell and change its format to General with Home > Number Format > General, or press Ctrl+Shift+~ on Windows. The date turns into its serial number. Change the format back and the date reappears. Nothing about the value changed, only its appearance. This is the single most useful mental model for working with dates: the value is a number, the format is a costume.
Times follow the same logic. A day is 1, so an hour is 1/24 and noon is 0.5. A cell that shows 15 Dec 2025 12:00 contains 46006.5. You will use this heavily in the time-math labs later in the course, where the trick of multiplying by 24 turns a time difference into decimal hours.
Worked example: Kestrel’s service-ticket log
Kestrel logs every service ticket with the date it was opened and the date it was closed. Management wants to know how long tickets stay open, which year and month they belong to, and when the follow-up visit is due. The table below shows the eight tickets from the lab with the four calculated columns filled in.
| Ticket | Opened (B) | Closed (C) | Days open (D) | Year (E) | Month (F) | Follow-up (G) |
|---|---|---|---|---|---|---|
| T-1041 | 24 Nov 2025 | 3 Dec 2025 | 9 | 2025 | Nov | 1 Dec 2025 |
| T-1042 | 15 Dec 2025 | 6 Jan 2026 | 22 | 2025 | Dec | 1 Jan 2026 |
| T-1043 | 8 Jan 2026 | 9 Jan 2026 | 1 | 2026 | Jan | 1 Feb 2026 |
| T-1044 | 30 Jan 2026 | 12 Feb 2026 | 13 | 2026 | Jan | 1 Feb 2026 |
| T-1045 | 17 Feb 2026 | 2 Mar 2026 | 13 | 2026 | Feb | 1 Mar 2026 |
| T-1046 | 5 Mar 2026 | 5 Mar 2026 | 0 | 2026 | Mar | 1 Apr 2026 |
| T-1047 | 21 Mar 2026 | 1 Apr 2026 | 11 | 2026 | Mar | 1 Apr 2026 |
| T-1048 | 14 Apr 2026 | 30 Apr 2026 | 16 | 2026 | Apr | 1 May 2026 |
Days open. Because both dates are numbers, the formula is a plain subtraction: =C2-B2. For T-1042 that is 46028 − 46006 = 22 days. The ticket was opened before Christmas and closed after New Year, but that makes no difference to the arithmetic; Excel does not care about month or year boundaries when it subtracts. T-1046 was opened and closed on the same day, so it was open 0 days. If your organisation counts both the first and the last day, add 1, but be consistent and document the rule, because the lab and most service-level reports count the way shown here.
Year. =YEAR(B2) returns the year of the opening date as a plain number, such as 2025. The function ignores the format of the cell and reads the underlying serial number. That makes it perfect for grouping: a SUMIFS or a PivotTable on the year column instantly splits the log into 2025 and 2026 tickets. MONTH and DAY work in exactly the same way and return 1–12 and 1–31.
Month label. =TEXT(B2,"mmm") turns the opening date into a three-letter month name such as Nov or Dec. The second argument is a format code in double quotes, built from the same letters you use in custom number formats: d for day, m for month and y for year, repeated to make the output longer. The result is text. It looks perfect in a report heading, but Excel can no longer calculate with it or sort it chronologically, because as text, Apr comes before Jan.
| Format code | Shows | Format code | Shows |
|---|---|---|---|
d | 5 | m | 3 |
dd | 05 | mm | 03 |
ddd | Thu | mmm | Mar |
dddd | Thursday | mmmm | March |
yy | 26 | yyyy | 2026 |
mmm yyyy | Mar 2026 | dd/mm/yyyy | 05/03/2026 |
Follow-up visit. The rule is "the first day of the month after the ticket was opened". The robust formula is =DATE(YEAR(B2),MONTH(B2)+1,1). It takes the opening date apart, adds one to the month, sets the day to 1 and builds a new date. The clever part is what happens in December. For T-1042, opened on 15 Dec 2025, the formula asks for DATE(2025,13,1). Month 13 does not exist, so Excel rolls it over into January of the following year and returns 1 Jan 2026. You never need a special case for the end of the year.
| Cell | Formula | Result for T-1042 (row 3) |
|---|---|---|
| D3 | =C3-B3 | 22 |
| E3 | =YEAR(B3) | 2025 |
| F3 | =TEXT(B3,"mmm") | Dec (text) |
| G3 | =DATE(YEAR(B3),MONTH(B3)+1,1) | 1 Jan 2026 |
| G3 (alternative) | =EOMONTH(B3,0)+1 | 1 Jan 2026 |
| spare cell | =TEXT(B3,"ddd d mmm yyyy") | Mon 15 Dec 2025 (text) |
Formatting a date versus converting it to text
There are two ways to make a date look different, and choosing the right one saves trouble later. A number format changes only the appearance: select the cells, press Ctrl+1, choose Custom and type a code such as mmm yyyy. The cell still holds the serial number, so it still sorts in date order, still works in SUMIFS and still feeds charts correctly. The TEXT function creates a new value that is text. It is the right tool when the date has to become part of a sentence or a label, such as a report title or a key that joins a date to other text.
A simple rule of thumb: if you only want the cell to look like "Dec 2025", use a custom number format; if you need the words "Dec 2025" inside another piece of text, use TEXT. In the lab, the month column uses TEXT on purpose, because the task is to create a label. In your own reports, consider keeping a real date column for sorting and calculations next to any TEXT label column, so you never have to choose between a readable report and a correct one.
The same thinking applies to the year. =YEAR(B2) returns the number 2025, which you can compare, add to and group by. =TEXT(B2,"yyyy") returns the text "2025", which looks identical but will not match the number 2025 in a lookup. When a formula that compares years mysteriously fails, a number-versus-text mismatch is the first thing to check.
How to do it in Excel, step by step
- Check that your dates really are dates. Click a cell in the Opened column and look at the formula bar, then press Ctrl+Shift+~ to switch to General. If you see a five-digit number, it is a real date. If nothing changes, the "date" is text and must be converted first (see the mistakes section below). Undo with Ctrl+Z.
- In D2, type
=C2-B2and press Enter. If the result looks like a date in January 1900, the cell inherited a date format: press Ctrl+Shift+~ or choose Home > Number Format > General or Number. - Fill the formula down to D9 by double-clicking the fill handle, the small square at the bottom-right corner of the selected cell.
- In E2, type
=YEAR(B2), press Enter and fill down. Again, if the year appears as a date such as 17 Jul 1905, set the format to General. - In F2, type
=TEXT(B2,"mmm")and fill down. Note that the result is left-aligned: that is the sign of a text value. - In G2, type
=DATE(YEAR(B2),MONTH(B2)+1,1)and fill down. Format G2:G9 as a date with Ctrl+1 (Cmd+1 on Mac) > Number > Date, or choose a custom code such asd mmm yyyy. - Check the edge case: T-1042 was opened in December, so G3 must show 1 Jan 2026, and E3 must still show 2025, because the year belongs to the opening date.
- Optional: build a report heading with
="Tickets opened in "&TEXT(B2,"mmmm yyyy"), which returns "Tickets opened in November 2025".
=TODAY() returns today’s date as a formula that updates every day, which is ideal for "days open so far" on tickets that are still open: =TODAY()-B2.Reading the results
Laid out on a calendar, the log tells a story the raw numbers hide. Most tickets close within about two weeks, but T-1042, the one that ran across the holiday period, took 22 days, and T-1048 took 16. A manager looking at this chart would ask whether the holiday period needs extra cover. That question only becomes visible once the dates have been turned into durations, which is exactly what the subtraction in column D does.

Common mistakes and how to spot them
- Dates stored as text. Imported dates are often text that only looks like a date. Signs: they are left-aligned, switching to General changes nothing, and
=ISNUMBER(B2)returns FALSE. Fix them with Data > Text to Columns > Finish (choose the right date order in step 3), or with=DATEVALUE(B2)in a helper column. - Day and month swapped. 03/04/2026 is 3 April in most of Europe and 4 March in the United States. Excel reads typed dates according to the regional settings of the computer. Check a date with a day above 12: if 13/04/2026 stays as text, the order is wrong.
- Result formatted as a date.
=C2-B2showing "9 Jan 1900" is not wrong; it is 9 days wearing a date format. Change the format to General. - Calculating with TEXT results.
=TEXT(B2,"mmm")returns text. Sorting by it gives alphabetical order (Apr, Dec, Feb …). Keep the real date orMONTH(B2)for sorting and grouping; use TEXT only for labels. - Adding 30 days instead of a month.
=B2+30is not "next month". From 31 January it lands in early March in a non-leap year. Use DATE, EDATE or EOMONTH when the rule is about calendar months. - Hidden times. A date imported with a time, such as 46006.75, shows as 15 Dec 2025 but does not equal a typed 15 Dec 2025. Strip the time with
=INT(B2)before comparing or looking up. - TEXT codes in other languages. The format codes in TEXT depend on the language of Excel. A workbook written with "yyyy" may need a different code in a localised version. If a TEXT result shows the code letters literally, check the language settings.
Quick reference: functions and shortcuts used
| Function / shortcut | Syntax or keys | What it does |
|---|---|---|
| DATE | DATE(year, month, day) | Builds a date from numbers, rolling over out-of-range months and days |
| YEAR / MONTH / DAY | YEAR(date), MONTH(date), DAY(date) | Take a date apart into plain numbers |
| TEXT | TEXT(value, "mmm yyyy") | Turns a date into a text label in any format |
| EOMONTH | EOMONTH(start_date, months) | Last day of a month; +1 gives the first day of the next |
| TODAY / NOW | TODAY(), NOW() | Current date, or date and time, recalculated on every change |
| DATEVALUE | DATEVALUE("15 Dec 2025") | Converts a text date into a serial number |
| Insert today’s date | Ctrl+; (semicolon) | Types a fixed date that will not change tomorrow |
| Insert current time | Ctrl+Shift+; | Types a fixed time |
| Format Cells | Ctrl+1 (Cmd+1 on Mac) | Choose a date format or a custom code |
| General format | Ctrl+Shift+~ (Windows) | Reveals the serial number behind a date |
Real-world uses
- Service and support desks. Days open per ticket, average resolution time per month and a list of tickets older than, for example, ten days with
=TODAY()-B2>10. - Accounts receivable. Days between invoice date and payment date to measure how quickly customers pay, grouped by month with TEXT or by year with YEAR.
- Contracts and subscriptions. The first billing date of the following month with
=DATE(YEAR(A2),MONTH(A2)+1,1)for every new customer, regardless of the day they signed. - HR records. Probation end dates, anniversaries and monthly headcount reports, where YEAR and MONTH turn a list of start dates into groups.
- Reporting headers. Dynamic titles such as
="Sales report "&TEXT(EOMONTH(TODAY(),-1),"mmmm yyyy")that always name the previous month.
What you will build in the rest of this course
This first lab is free. The paid labs continue with Kestrel’s data and take you from simple date arithmetic to complete schedules, with every cell checked instantly by the Coach.
EDATE & EOMONTH: Renewals, Due Dates & Fiscal Periods. You calculate renewal dates, end-of-next-month invoice due dates, calendar quarter ends and the fiscal year for eight maintenance contracts, using the two functions built for whole-month steps.
NETWORKDAYS & WORKDAY with Holidays and Custom Weekends. You set service-level due dates that skip weekends and closure days, count the working days each job took, handle a Monday-to-Saturday crew with NETWORKDAYS.INTL and flag late jobs.
DATEDIF & YEARFRAC: Age, Tenure and Pro-Rata Amounts. You calculate age and length of service on a report date, write tenure as "years and months", convert it into decimal years and pay a pro-rata bonus.
WEEKDAY, WEEKNUM & ISOWEEKNUM: A Weekly Revenue Report. You give each job a weekday number, an ISO week number and the Monday its week starts on, then total revenue per week with SUMIFS.
Time Math: Hours Worked, Overnight Shifts, MOD & ×24. You calculate shift lengths that cross midnight, convert times into decimal paid hours, round them to the nearest quarter hour and display totals above 24 hours correctly.
Weekly Timesheet: Regular Hours, Overtime & Pay. You split a technician’s weekly hours into regular and overtime hours with MIN and MAX, calculate daily pay with an overtime factor and chart the week.
Project Schedule: WORKDAY Chains & a Gantt-Style Bar Chart. You schedule an HVAC retrofit project in which each task starts after the previous one ends, count calendar days per task and turn the plan into a Gantt-style bar chart.
Summary
Excel stores dates as serial numbers and shows them through a format. Subtract two dates to get the days between them, use YEAR, MONTH and DAY to take a date apart, DATE to build one, with automatic roll-over into the next month or year, and TEXT to turn a date into a readable label when you no longer need to calculate with it. Check that imported dates are real numbers before you start, and most date problems never happen.
Now scroll back up and try it in the free lab: count the days each Kestrel ticket was open, extract the year, label the month and schedule the follow-up visits. The Coach checks every answer instantly, including the tricky December ticket.
Frequently asked questions
How does Excel store dates?
Excel stores a date as a serial number, the count of days since 1 January 1900, which is day 1. For example, 1 January 2026 is 46023. The date format only controls how that number is displayed.
How do I calculate the number of days between two dates in Excel?
Subtract the earlier date from the later one, for example =C2-B2. If the result looks like a date, change the cell format to General or Number.
Why does my date show as a five-digit number?
The cell has a General or Number format, so Excel shows the serial number behind the date. Apply a date format with Ctrl+1 to display it as a date again.
How do I get the month name from a date in Excel?
Use TEXT with a month code: =TEXT(B2,"mmm") returns Mar and =TEXT(B2,"mmmm") returns March. The result is text, so use MONTH(B2) when you need a number to sort or calculate.
How do I get the first day of next month in Excel?
Use =DATE(YEAR(B2),MONTH(B2)+1,1) or =EOMONTH(B2,0)+1. Both work in December too, because Excel rolls month 13 over into January of the next year.
Why is my date not recognised as a date in Excel?
It is probably stored as text, often after an import or because the day and month order does not match your regional settings. Convert it with Data > Text to Columns or with DATEVALUE in a helper column.
Keep going: Excel Dates & Times: DATE, EOMONTH, NETWORKDAYS, Time Math & Schedules
This free lab is lesson 1 of 20. Unlock the other 19 hands-on labs, the final exam and your certificate for a one-time $9.90.
- EDATE & EOMONTH: Renewals, Due Dates & Fiscal Periods
- NETWORKDAYS & WORKDAY with Holidays and Custom Weekends
- DATEDIF & YEARFRAC: Age, Tenure and Pro-Rata Amounts
- WEEKDAY, WEEKNUM & ISOWEEKNUM: A Weekly Revenue Report
- Time Math: Hours Worked, Overnight Shifts, MOD & ×24
- Weekly Timesheet: Regular Hours, Overtime & Pay
- Project Schedule: WORKDAY Chains & a Gantt-Style Bar Chart
- Imported Dates: Turning yyyymmdd Numbers and dd.mm.yyyy Text into Real Dates
- Date-Time Stamps: INT, HOUR & Response Times in Hours
- Business-Hours Elapsed Time: Counting Only Opening Hours Between Two Timestamps
- Recurring Dates: the 2nd Tuesday, the Last Friday & Paydays That Move Before Weekends
- Annual Inspections: Next Anniversary Date, Days Until & Booking Flags
- Period Totals with Date Criteria: Month-to-Date, Last Month & Same Period Last Year
- Turnaround Times: Days to Close, Median vs Average & a Histogram
- Date Quality Checks: Text Dates, End Before Start, Future and Weekend Entries
- Route Timing: Arrival Chains with TIME, Customer Windows & the Return to Depot
- Billing Call-Outs: Rounding Up to 15 Minutes, Minimum Charges & After-Hours Rates
- Monthly Capacity: Workdays per Month, Leave, Available Hours & Utilisation
- Final Project: Service Contract Date Dashboard with Renewal Status & Chart