DATEVALUE Function

Excel Functions › Date & Time

All versions Date & Time

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).


Quick answer: turn text into a real date:
=DATEVALUE("June 15, 2026") // returns the serial - format it as a date

Syntax

=DATEVALUE(date_text)
ArgumentDescription
date_textRequiredA 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”:

=DATEVALUE(A2) // converts each text date in column A

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

Live demo

Adjust the input and watch the formula and result update.

Result:

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

📊
Download the free DATEVALUE practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

Why does DATEVALUE return a number?
It returns the date serial. Format the cell (Ctrl+1 → Date) to display it as a date.
Why do I get #VALUE!?
The text isn’t a recognizable date in your regional settings — e.g. "13/06/2026" on a US system reads month 13. Match the order to your locale or rebuild with DATE.
Do modern Excel versions still need it?
Often not — Excel auto-converts many text dates. DATEVALUE is for stubborn text that stays left-aligned and won’t calculate.
DATEVALUE vs DATE?
DATEVALUE parses a text string; DATE builds a date from separate year, month, day numbers. Use DATE when you already have the parts.

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

Related functions: DATE · TODAY · DATEDIF · EOMONTH · TEXT