The Excel DATEVALUE function converts a date stored as text into a real date serial number, so you can sort, filter, and do math with dates that arrived as text (from imports, CSVs, or pasted reports).
Syntax
| Argument | Description | |
|---|---|---|
date_text | Required | A date written as text, e.g. "15-Jun-2026" or "6/15/2026". |
How to use it
The result is a number until you format the cell as a date. DATEVALUE only handles the date portion — for times use TIMEVALUE. A frequent fix for “dates that won’t sort”:
Remember Excel’s date system: every date is a serial number (days since Jan 1, 1900 — so 1 = that day, 46000-ish = today) and every time is a fraction of a day (0.5 = noon). If a result shows a raw number, just apply a date or time cell format.
Try it: interactive demo
Adjust the input and watch the formula and result update.
Tips & gotchas
Convert a text date into a real date serial so it sorts and calculates. Format result cells as Date or Time so they don’t display raw serial numbers.
Practice workbook
Frequently asked questions
Why does DATEVALUE return a number?
Why do I get #VALUE!?
Do modern Excel versions still need it?
DATEVALUE vs DATE?
Master functions like this in one day
This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.
See the Formulas & Functions Class