Excel Formula Format DATEVALUE

There are two ways to “excel formula format datevalue”: 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.

Syntax

=DATEVALUE(date_text) and =TIMEVALUE(time_text)

Arguments

ArgumentDescription
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 “excel formula format datevalue” 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. One habit worth forming early: name the cells that hold your inputs, so the formula reads in plain language instead of a string of cell addresses. A reviewer — or you in three months — can then follow the logic without decoding what B7 and D2 were supposed to mean, which is most of what makes a sheet maintainable.

In Google Sheets

If you are in Google Sheets rather than Excel, the good news is that the formula shown here is identical and the workflow barely changes — menus sit across the top instead of in a ribbon, and a few function names differ slightly, but anything you build here moves across with little or no rework. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. Here is the takeaway for “excel formula format datevalue”: 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.