
Convert a date stored as text into a real Excel date value. DATEVALUE is useful when imported dates look correct but still behave like text.
The DATEVALUE function converts a date stored as text into a real Excel date value. This is useful when imported data looks like a date on the screen but still behaves like text in formulas, sorting, or filtering.
That difference matters because Excel can only do proper date math with real date values. If the value is still text, many date calculations will fail or give unreliable results.
Its main job is to turn something that looks like a date into something Excel can truly calculate with. Once the text is converted into a real date serial, the value can be filtered, compared, subtracted, or reformatted like any other normal date in the workbook.
Use DATEVALUE when an imported date looks right but Excel still treats it like text.
Excel stores dates as serial values. After conversion, you can format the result as a normal calendar date.
=DATEVALUE(date_text)
DATEVALUE takes one argument: a text string that Excel can interpret as a date. You can type the text directly in the formula or point to a cell that contains the text.
One important detail is that DATEVALUE returns the underlying date value, not a special display format. After conversion, the cell may show a serial number until you format it as a date.
If Excel cannot recognize the text as a valid date, the formula can return an error.
DATEVALUE is designed specifically for date text. Other tools can also convert values, but they are not as focused.
| Method | Main Job | Best For | Example |
|---|---|---|---|
DATEVALUE |
Convert text dates | Date strings that should become real Excel dates | =DATEVALUE("2026-01-01") |
DATE |
Build a date from numbers | Separate year, month, and day inputs | =DATE(2026,1,1) |
VALUE |
General numeric conversion | Mixed text that may represent numbers, dates, or times | =VALUE(A1) |
TRIM |
Remove extra spaces | Messy text before conversion | =DATEVALUE(TRIM(A1)) |
The easiest rule is this: use DATEVALUE when the date already exists as text and needs to become a real Excel date.
The most common use case is imported data. A CSV export, copied report, or web import may contain dates that look normal but do not behave like real dates. DATEVALUE helps convert those text entries into values Excel can sort, compare, and calculate with.
Another useful detail is that DATEVALUE depends on recognizable date text. That means regional format can matter. A text string like 01/02/2025 may be interpreted differently depending on local settings, while clearer text such as 2025-02-01 or 1-Feb-2025 is usually safer.
DATEVALUE when the input is text, not a real date.TRIM first if imported text includes extra spaces.One more thing to remember is that if the text does not include a year, Excel may assume the current year. That can be useful, but it can also surprise you if you expected a fixed year.
This is the basic use of DATEVALUE: convert readable date text into a real Excel date value.
=DATEVALUE("Dec 25, 2025")
After conversion, Excel can treat the result as a real date in formulas and sorting.
In cell C2, convert the text date in B2 into a real Excel date.
ISO-style text dates are often easier to parse reliably because the order is explicit.
=DATEVALUE("2026-01-01")
This is a common pattern in imported datasets and exported system logs.
In cell C3, convert the text date in B3 into a real Excel date.
If the text only includes a month and day, Excel can supply the current year automatically.
=DATEVALUE("5-Oct")
That behavior can be useful, but it is important to know it is happening.
In cell C4, convert the text date in B4 into a real Excel date.
Imported text sometimes includes extra spaces, so cleaning the input first can make the conversion more reliable.
=DATEVALUE(TRIM(" 2025-10-15 "))
This removes the extra spaces before Excel tries to interpret the date text.
In cell C5, trim the text date in B5 before converting it.
DATEVALUE is most useful when dates already exist as text but need to behave like real Excel dates. Once the value is converted, sorting, filtering, and date math become much more reliable.
DATEVALUE converts date text into a real Excel date value.TRIM before converting.Tell your friends about this post