Days into the year
| A | |
|---|---|
| 1 |
Formula: A1: =DATEVALUE("3/15/2024")-DATE(2024,1,1)
Result: 74
The text becomes a serial number; subtracting January 1 gives the days since then.
DATEVALUE with worked examples you can test in the live grid. The argument details are in the Excel guide.
The arguments and common errors are covered in the DATEVALUE Excel guide; check the function help in Google Sheets for its own argument list.
| A | |
|---|---|
| 1 |
Formula: A1: =DATEVALUE("3/15/2024")-DATE(2024,1,1)
Result: 74
The text becomes a serial number; subtracting January 1 gives the days since then.
| A | |
|---|---|
| 1 |
Formula: A1: =DATEVALUE("2024-03-15")-DATEVALUE("2024-03-01")
Result: 14
ISO-formatted text is understood everywhere, and the difference is 14 days.
| A | |
|---|---|
| 1 |
Formula: A1: =DATEVALUE("hello")
Result: #VALUE!
The text cannot be read as a date, which gives an error.
A tiny spreadsheet with example data. Edit the formula or any number and see the result.
Formula in F2: =DATEVALUE("3/15/2026")
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Start | End | Holiday | Time | Result | |
| 2 | 3/15/2026 | 6/20/2026 | 5/1/2026 | 14:45 | 3/15/2026 | |
| 3 | 1/31/2026 | 2/28/2026 | 5/9/2026 | 09:30 | ||
| 4 | 12/24/2025 | 1/9/2026 |
Google Sheets is used here only as a descriptive product name. FormulaCamp is not affiliated with Google.
Enter — commit · F2 — edit · F4 — $ in a reference · Ctrl+C/Ctrl+V — copy and paste · Ctrl+Z — undo
Esc or F6 — leave the sheet for the «Check» button · Shift+Tab in the first cell — back to the page