Date & time function

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)
ArgumentWhat it means
date_textRequiredText 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

A1fx=DATEVALUE("2026-06-30")
A
146203

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

B2fx=DATEVALUE(A2)
AB
1Order date (text)Real date
215-Mar-20262026-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

C2fx=DATEVALUE("1-"&A2&"-"&B2)
ABC
1MonthYearFirst of month
2Sep20262026-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.

⬇Practice workbookExamples with live formulas + practice sheets · .xlsx · 15 KB

Common errors and how to fix them

ErrorWhy it happensFix
#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 monthAn 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 =--A2 also 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.

LanguageFunction name
CzechDATUMHODN
DanishDATOVÆRDI
DutchDATUMWAARDE
FinnishPÄIVÄYSARVO
FrenchDATEVAL
GermanDATWERT
HungarianDÁTUMÉRTÉK
ItalianDATA.VALORE
Norwegian (Bokmål)DATOVERDI
PolishDATA.WARTOŚĆ
Portuguese (Brazil)DATA.VALOR
Portuguese (Portugal)DATA.VALOR
RussianДАТАЗНАЧ
SpanishFECHANUMERO
SwedishDATUMVÄRDE
TurkishTARİHSAYISI

Recipes that use DATEVALUE