DATEVALUE function
Converts a date written as text into a real Excel date serial number that you can calculate with.
Available in All versions of Excel (Windows and Mac), Excel for Microsoft 365, Excel for the web
In every Excel versionWorks in Google Sheets
Syntax
DATEVALUE(date_text)| Argument | What it means | |
|---|---|---|
date_text | Required | Text that looks like a date, e.g. "2026-06-30" or "15-Mar-2026", or a reference to a cell holding such text. |
Returns: A date serial number. Format the cell as a date to see it as a date.
How DATEVALUE works
Data pasted from websites, CSV files or other systems often arrives as text that looks like a date. It may be left-aligned, refuse to sort properly and ignore date filters. DATEVALUE reads that text and returns the real date serial number, so the value works with subtraction, EDATE, pivot-table grouping and everything else.
DATEVALUE understands the date formats your Windows or Mac regional settings understand, plus unambiguous forms like ISO 2026-06-30 and 30-Jun-2026. A time part, if present, is ignored. If the text leaves out the year, the current year is assumed. Because interpretation follows regional settings, "03/04/2026" is 4 March for a US user but 3 April for a UK user — prefer ISO or month-name formats when sharing workbooks.
Examples
1Convert an ISO date string
| A | |
|---|---|
| 1 | 46203 |
Result: 46203
The text is turned into serial number 46203. In a General-formatted cell you see the number; apply a date format to see 2026-06-30.
2Fix text dates imported from a CSV
| A | B | |
|---|---|---|
| 1 | Order date (text) | Real date |
| 2 | 15-Mar-2026 | 2026-03-15 |
Result: 2026-03-15
A2 holds text that only looks like a date (it is left-aligned and ignored by date filters). DATEVALUE converts it to serial 46096 (cell formatted as yyyy-mm-dd), which can now be sorted and grouped by month.
3Build a date from month and year columns
| A | B | C | |
|---|---|---|---|
| 1 | Month | Year | First of month |
| 2 | Sep | 2026 | 2026-09-01 |
Result: 2026-09-01
The formula builds the text "1-Sep-2026" and DATEVALUE converts it (cell formatted as yyyy-mm-dd). Handy when reports give month names instead of numbers.
Common errors and how to fix them
| Error | Why it happens | Fix |
|---|---|---|
#VALUE! | The text is not recognised as a date in your regional settings, or the cell already contains a real date (a number). | Check the format; if ISNUMBER on the cell returns TRUE it is already a date and needs no conversion. |
Wrong day and month | An ambiguous text like "03/04/2026" is read using your locale's day/month order. | Use DATE with LEFT, MID and RIGHT to split the text explicitly. |
Tips
- For a whole column of text dates, Data > Text to Columns > Finish (choosing the right date order in step 3) converts them in place without formulas.
- DATEVALUE ignores any time in the text; use TIMEVALUE for the time part, or
=DATEVALUE(A2)+TIMEVALUE(A2)for both. - A double negative
=--A2also converts recognised text dates and is shorter.
Google Sheets
DATEVALUE also exists in Google Sheets and works the same way for everyday use, so the examples above work there too.
DATEVALUE in other languages
In a non-English version of Excel the function has a local name. Excel translates formulas automatically when a file is opened in another language.
| Language | Function name |
|---|---|
| Czech | DATUMHODN |
| Danish | DATOVÆRDI |
| Dutch | DATUMWAARDE |
| Finnish | PÄIVÄYSARVO |
| French | DATEVAL |
| German | DATWERT |
| Hungarian | DÁTUMÉRTÉK |
| Italian | DATA.VALORE |
| Norwegian (Bokmål) | DATOVERDI |
| Polish | DATA.WARTOŚĆ |
| Portuguese (Brazil) | DATA.VALOR |
| Portuguese (Portugal) | DATA.VALOR |
| Russian | ДАТАЗНАЧ |
| Spanish | FECHANUMERO |
| Swedish | DATUMVÄRDE |
| Turkish | TARİHSAYISI |