Convert Date Into Number in Excel

There are two ways to “convert date into number in excel”: the quick way you copy and the durable way you understand. This page gives you both. The exact Excel answer is above; below, we build the small mental model that makes the fix stick, so the next variation of the same problem solves itself.

Exact answer

In Excel: a number like 45443 is a date in disguise — format the cell as a Date (Ctrl+1 ▸ Date) or convert it with =TEXT(A2,"yyyy-mm-dd"); 45443 is May 31, 2024.

On this page7
▤Annotated stepsExcel
1

Select the cells showing five-digit numbers and press Ctrl+1.

2

Choose Date (or a custom format like yyyy-mm-dd) and confirm.

3

For a text version, use =TEXT(A2,"yyyy-mm-dd"); for the reverse, =DATEVALUE("2024-05-31").

4

Decode a single serial instantly with the converter above.

=TEXT(A2,"yyyy-mm-dd")
Ctrl+CthenCtrl+Shift+V⌘+Cthen⌘+Ctrl+VPaste values · WindowsMac

What this does

Excel stores every date as a serial number: the count of days since January 1, 1900 (serial 1). Times are the fraction after the decimal point — 45443.5 is noon. The "date" you see is only a number format. That is why date math works (=B2-A2 is plain subtraction), why a date pasted into a General cell shows as a five-digit number, and why serial 60 is a famous oddity: it represents February 29, 1900, a day that never existed, kept for Lotus 1-2-3 compatibility. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. For “convert date into number in excel”, the reliable version is a short checking loop, not just the first command that appears to work. Run it on a deliberately small range first, watch how the affected cells change, and only then apply the same setup to the full sheet. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That is what makes a data step that keeps your analysis trustworthy useful in real work: repeatable, auditable, and not dependent on memory or luck.

A worked example

A CSV import shows 45443 where a date belongs. Select the column, press Ctrl+1, choose Date — the cell now displays 31/05/2024. The stored value never changed; only the format did. To get a text date instead, =TEXT(A2,"yyyy-mm-dd") returns "2024-05-31". Serial numbers surface constantly — CSV exports, lookups returning 45443, dates pasted into General cells. Knowing they are formats, not values, turns a confusing five-digit number into a one-click fix. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.

In Google Sheets

Google Sheets support for this task has not been verified. Check the function, arguments and workflow in the target product before transferring the example. Matching formula notation does not establish identical behaviour. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. For “convert date into number in excel”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.

Common mistakes

  • Re-typing the dates by hand instead of changing the number format.
  • Subtracting dates and formatting the result as a Date — a difference is a count of days; format it as Number.
  • Mixing the 1900 system with files from old Mac Excel (1904 system), which shifts every date by 1462 days.
  • Expecting serials for dates before 1900 — Excel cannot store them as dates.

Frequently asked questions

Why does my date show as a number like 45443?

The cell has a General or Number format. The value is the date serial; apply a Date format and it displays as May 31, 2024.

What is Excel serial number 1?

January 1, 1900. Each following day adds 1; fractions are time of day.

Why does Excel think 1900 was a leap year?

Serial 60 is February 29, 1900 — a bug inherited from Lotus 1-2-3 and kept deliberately for file compatibility.

Other ways people ask this

On the way here you may have searched this as “how to convert number into date in excel”, “how to convert a date into a number in excel” and “how to convert date into number in excel” — it is all the same task, and this page is the single, complete answer to it.

Why do people search for this in so many different ways?

Because the same task has many names. “how to convert number into date in excel”, “how to convert a date into a number in excel”, “how to convert date into number in excel” all point at the one operation explained on this page, which is why they all lead here.