DATEVALUE Formula in Excel

There are two ways to “datevalue formula in excel”: the quick way you copy and the durable way you understand. This page gives you both. The exact Excel answer is above with a tool to test it; below, we build the small mental model that makes the fix stick, so the next variation of the same problem solves itself.

Exact answer

In Excel: use =DATEVALUE(date_text) — it converts a date stored as text into a real date serial number, which is what makes sorting and filtering work again.

On this page8

Syntax

=DATEVALUE(date_text) and =TIMEVALUE(time_text)

Arguments

Argumentrequired / optionalDescription
date_textrequiredA date written as text, in a format your locale recognises.
time_textrequiredFor TIMEVALUE: a time written as text.

Related functions

DATEVALUEISNUMBER
ƒxExcel Date Serial ConverterLive
Serial as date
May 31, 2024
Date as serial
46184
=TEXT(A2,"yyyy-mm-dd") · =DATEVALUE(B2)
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

Need it as an auditable file?

Ships inside the linked template — formula-driven, unlocked, audit-ready.

View template

What this does

DATEVALUE turns text that reads like a date into an actual date value, and TIMEVALUE does the same for times. This is the repair for the most frequent import defect after text-stored numbers: dates that look right, sort alphabetically, and are ignored by every date filter and calculation. The catch is locale — "03/04/2026" is March in the US and April in Europe, and DATEVALUE follows your system settings without asking. Where the source format is unambiguous that is fine; where it is not, rebuilding the date with DATE and explicit parts is the safe route. The same idea underpins a lot of everyday Excel work, so the few minutes spent getting it right here pay back across every sheet you build afterwards. Treat it as a pattern, not a one-off, and it stops being something you look up and starts being something you reach for. Treat “datevalue formula in excel” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected formula shows up while it is still harmless. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That turns a calculation you can defend to a CFO or an auditor into a method you can reuse, explain, and defend when the workbook leaves your screen.

A worked example

Repairing an imported text date: =DATEVALUE(A2), then format the result as a date. Confirming the problem first: =ISNUMBER(A2) returning FALSE on a date-looking cell means it is text. Locale-proof rebuilding for an unambiguous ISO string: =DATE(LEFT(A2,4), MID(A2,6,2), RIGHT(A2,2)). Combining a text date and time: =DATEVALUE(A2) + TIMEVALUE(B2). DATEVALUE fixes date columns that sort alphabetically, which is the defect that makes an imported report silently unusable. A practical tip before you scale it up: build it once on a small block of test data, confirm the number against the tool on this page, and only then point it at your real sheet. That one habit catches almost every mistake while it is still cheap to fix, long before a wrong figure reaches a report or a colleague.

In Google Sheets

Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. Keep this page bookmarked for the next time the same question comes up. Better still, rebuild the example once in your own sheet — doing it yourself, with the tool above to check against, is what turns a copied formula into a technique you own. Here is the takeaway for “datevalue formula in excel”: copy the answer if you are busy, but if you have a spare few minutes, rebuild the example in Excel yourself with the tool above open beside it. That single pass — type it, run it, watch the result move when you change an input — is what turns a formula you found into a technique you trust. Keep your inputs labelled and referenced, never hard-coded, and the same sheet stays correct and auditable as it grows. Done that way, you will not need to look this up again, and you will be the person others ask.

Common mistakes

  • Trusting it on ambiguous formats such as 03/04/2026, where the locale silently decides the month.
  • Passing a value that is already a real date, which returns #VALUE!.
  • Forgetting to format the result, which shows a five-digit serial number.

Frequently asked questions

How do I convert text to a date in Excel?

=DATEVALUE(A2) then format as a date, or Data → Text to Columns with the date format selected for a whole column at once.

Why does DATEVALUE return #VALUE!?

Either the text is not recognisable as a date in your locale, or the cell already holds a real date.

How do I avoid the day/month ambiguity?

Rebuild the date explicitly with DATE and the parts sliced out of the string, which never depends on locale.