Sub topic 1
Dates are numbers: serial values and formatting
A financial model's timeline row feeds every later calculation: flags, day counts, escalation, discounting and annual roll-ups. All of those calculations treat dates as numbers. This chapter explains how Excel stores a date, why a date cell can show a number, and how to format and test date cells so that the rest of the timeline work in this tutorial behaves predictably.
Prerequisites
This chapter assumes you already know:
- Basic Excel formulas, and the difference between relative and absolute references (
D5versus$C$3). - The layout of a column-based financial model, with time periods running across the columns.
- Basic use of
SUMIFSand of theYEAR,MONTHandDAYfunctions. These come up in later chapters, and this chapter only touches them lightly.
You do not need to know EOMONTH or EDATE yet. The next chapters introduce them.
A date is a count of days
Excel does not store "15 January 2025" as text. It stores a serial number, which is the count of days since a fixed starting point. In the default Windows date system, serial 1 is 1-Jan-1900, so serial 2 is 2-Jan-1900, and so on. The cell then applies a number format that decides how the number looks on screen.
Some reference points from the default system:
| Date | Serial number |
|---|---|
| 1-Jan-1900 | 1 |
| 1-Jan-2000 | 36526 |
| 1-Jan-2024 | 45292 |
| 31-Dec-2024 | 45657 |
| 1-Jan-2025 | 45658 |
| 15-Jan-2025 | 45672 |
| 28-Feb-2025 | 45716 |
Consecutive days differ by exactly 1. From 1-Jan-2024 to 1-Jan-2025 is 366 days because 2024 is a leap year, and 45658 − 45292 = 366.
This design explains most of the behaviour you will rely on in a timeline:
- Subtracting two dates gives a number of days.
- Adding a number to a date moves it forward by that many days.
- Comparing dates with
<,>and=is a numeric comparison. SUMIFSandMATCHcan use dates as criteria because they are numbers.
=DATE(2025,1,31)-DATE(2025,1,1) -> 30
=DATE(2025,1,31)-DATE(2025,1,1)+1 -> 31 (days in January, counting both ends)
=DATE(2025,1,15)+30 -> 14-Feb-2025
=DATE(2025,2,28)>DATE(2025,1,31) -> TRUE
=YEAR(45658) -> 2025The +1 in the second line matters later. A period that starts on the 1st and ends on the 31st contains 31 days, but the plain difference gives 30. Day-count formulas in a model usually need that inclusive +1.
The display is separate from the value
Formatting changes how a number looks. It never changes the number. The same cell can show three different things depending on its format:
| Cell value | Format | Displayed as |
|---|---|---|
| 45672 | General | 45672 |
| 45672 | dd-mmm-yyyy | 15-Jan-2025 |
| 45672 | mmm-yy | Jan-25 |
| 45672 | dddd | Wednesday |
The right-hand branch of the diagram is the important one. A formula that refers to a date cell receives the serial number, whatever the cell displays. If a cell displays Jan-25, the stored value is still a specific day, such as 15-Jan-2025. In a timeline this can mislead you. A header that shows Jan-25 may hold the 1st, the 15th or the 31st, and the display will not tell you which.
Setting a date format
Use Ctrl+1, then Number, then Date or Custom. Useful custom codes:
dd-mmm-yyyyshows15-Jan-2025. It is unambiguous in any regional setting, which makes it a good default for period-end rows.mmm-yyshowsJan-25. It is compact and suits headers on a monthly timeline.yyyyshows2025. It suits annual headers, but only when you really want a date underneath. A year label produced withYEAR()is a plain number and needs no date format.
Format codes entered in the dialog depend on your Excel language. Codes inside the TEXT function, such as TEXT(A1,"mmm-yy"), also depend on it, and the result can break on a machine with a different language. Prefer cell formatting over TEXT for timeline headers, and keep the real date in the cell.
The most common symptom: a date that shows as a number
Date functions return serial numbers, not "date-formatted" values. A new cell with the General format shows the raw serial:
=EOMONTH(DATE(2025,1,15),1) -> displays 45716 in a General cell
-> displays 28-Feb-2025 after applying dd-mmm-yyyyNothing is wrong with the formula. Apply a date format to the whole timeline row, not cell by cell. In many cases, Excel copies the format from the input cells a formula refers to, but you should not rely on that. Formatting rows deliberately is part of the model's standard layout.
Dates that look right but are text
The reverse problem is worse. A cell can display 31/01/2025 and still be text, not a number. This happens when you import data, paste from a web page or enter a date in a layout your regional setting does not recognise. Text dates are silent trouble: they look correct, but arithmetic and comparisons fail.
Ways to tell the difference:
- A real date is right-aligned by default. A text date is left-aligned, unless someone changed the alignment.
=ISNUMBER(A1)returnsTRUEfor a real date andFALSEfor text.- Changing the format to General turns a real date into a number, but leaves text unchanged.
A1 contains the text 31/01/2025 (left-aligned)
=ISNUMBER(A1) -> FALSE
=A1+1 -> #VALUE! (or a wrong result, depending on the setting)
=DATEVALUE(A1) -> 45688 (works only if the text matches your regional date layout)DATEVALUE is a repair tool for imported data. For model inputs, avoid the problem. Where a date is built inside a formula, use DATE(year, month, day), which has no regional ambiguity. A typed 03/04/2025 means 3 April in one setting and 4 March in another. DATE(2025,4,3) always means 3 April 2025.
Time of day hides in the decimal part
Excel stores a time of day as a fraction of a day. Noon is 0.5, and 18:00 is 0.75. A cell holding 45658.75 is 1-Jan-2025 at 18:00.
=DATE(2025,1,1)+0.75 -> 45658.75 (1-Jan-2025 18:00)
=INT(45658.75) -> 45658 (drops the time, keeps the date)
=NOW() -> includes the time
=TODAY() -> date only (time is zero)This matters for timelines because an equality test needs identical numbers. If a start-date input came from NOW() or from a system export with a time stamp, D6=EOMONTH(D6,0) can return FALSE even though the displayed dates match. The period end is a whole number, and the input has a fraction. For model inputs, use whole dates. If you cannot control the source, wrap it in INT.
Where the numbering starts: the date system setting
Two date systems exist:
- The 1900 system (default on Windows) counts from 1-Jan-1900 as serial 1.
- The 1904 system (an old Mac default) counts from 2-Jan-1904 as serial 1. Serials in the 1904 system are 1,462 lower for the same calendar date.
A workbook stores its setting (File > Options > Advanced > Use 1904 date system). If you paste dates between workbooks with different settings, every date shifts by about four years and one day, and nothing shows an error. Use the 1900 system for new models, and check the setting when you inherit an old file.
One more oddity: Excel treats 29-Feb-1900 as a valid date, although 1900 was not a leap year. This was kept for compatibility with older software. It affects only serials below 61, so it does not matter for modern financial models. Do not use serial numbers before March 1900.
Two small tools used throughout the tutorial
Later chapters build period start and end dates with EOMONTH, but DATE can already do part of that, because it accepts month and day values outside the normal range and rolls them over:
=DATE(2025,13,1) -> 1-Jan-2026 (month 13 rolls into the next year)
=DATE(2025,3,0) -> 28-Feb-2025 (day 0 is the day before the 1st)
=DATE(2025,1,0) -> 31-Dec-2024That rollover is why DATE(year, month+1, 0) returns a month end, and it hints at what EOMONTH will do more cleanly. Keep in mind that every one of these results is a serial number, and it needs a date format to be readable.
Practical rules for model dates
- Store dates as real serial numbers, never as text.
- Enter fixed dates with
DATE(y,m,d)or as a clearly formatted input cell, and keep them to one input per concept, such as one model start date. - Format every date row explicitly with a date format. Use
dd-mmm-yyyyfor period ends andmmm-yyfor compact headers. - Use whole-number dates. Remove times with
INTif a source includes them. - Use the 1900 date system, and be careful when you copy between workbooks.
- Remember that display and value are different. When a check or a formula gives a surprising result, change the format to General and look at the serial.
Exercise
A cell contains =EOMONTH(DATE(2025,1,15),1) and displays 45716. A colleague says the formula is broken. What do you tell them, and what is the fix?
Show answer
The formula is correct. EOMONTH returns a serial number, and the cell has the General format, so it shows the raw number. 45716 is 28-Feb-2025. Apply a date format such as dd-mmm-yyyy to the cell, or better, to the whole timeline row.
Exercise
An imported cell A1 displays 31/01/2025 and is left-aligned. =A1+1 returns #VALUE!. What is the likely cause, how do you confirm it, and how would you avoid it in a model input?
Show answer
The cell holds text, not a date serial. Confirm it with =ISNUMBER(A1), which returns FALSE. Repair imported data with DATEVALUE if the text matches your regional layout, or retype it. For model inputs, enter or build the date with DATE(2025,1,31), and add an ISNUMBER check on the input.
Exercise
Using serial numbers, how many days are there from 1-Feb-2025 to 28-Feb-2025 inclusive, and which formula gives it?
Show answer
28 days. The plain difference =DATE(2025,2,28)-DATE(2025,2,1) is 27, because it does not count both ends. Add 1 for an inclusive count: =DATE(2025,2,28)-DATE(2025,2,1)+1 returns 28.