Excel DATEVALUE function

Turns a date stored as text into a real date you can subtract and sort. In Spanish Excel it is called FECHANUMERO.

Syntax

English Excel

=DATEVALUE(date_text)

Spanish Excel (Mexico)

=FECHANUMERO(texto_de_fecha)

Spanish Excel (Spain, Latin America)

=FECHANUMERO(texto_de_fecha)

ArgumentWhat it is
date_textA date written as text, such as "2024-03-15".

Example

YEARFRAC(start, end) gives the years between two dates with decimals: 2.5 is two and a half years. DATEVALUE turns a date stored as text (like "2024-03-15", typical of a CSV) into a real date. ISOWEEKNUM gives the ISO week, used in logistics and payroll.

=DATEVALUE(D2)

Common mistake

If the date comes as "15/03/2024", the day/month order depends on regional settings; the year-month-day format always works.

About Ads

This site uses Google AdSense to display ads. These ads help us keep WebHerramientas completely free. Ads are managed by Google and meet strict security and privacy standards.

Advertising
Loading ad...

Ads help us keep WebHerramientas free for everyone

Practice DATEVALUE

Type the formula in the sheet and check it instantly. Spanish or English function names both work. See all lessons

Seniority, text dates and ISO weeks

YEARFRAC(start, end) gives the years between two dates with decimals: 2.5 is two and a half years. DATEVALUE turns a date stored as text (like "2024-03-15", typical of a CSV) into a real date. ISOWEEKNUM gives the ISO week, used in logistics and payroll.

Step 1/3

In C2, calculate each employee’s years of service as of the cutoff date in I1.

C2
ABCDEFGHIJ
1EmployeeHiredYearsLast payment (text)Last paymentISO weekCutoff12/31/2025
2Ana03/15/20192025-11-28
3Beto07/01/20222025-12-05
4Carla01/20/20152025-12-12
5Dani10/07/20242025-12-19
6Elena12/31/20202025-12-26
7

Tip: while typing, click a cell or drag across several to insert their reference. F4 anchors the reference with $.

Frequently asked questions

What is DATEVALUE called in Spanish?
In Spanish Excel it is FECHANUMERO. The formula =DATEVALUE(D2) is written =FECHANUMERO(D2) (or with commas in Mexico).
Why does DATEVALUE use semicolons in some Excel versions?
It depends on regional settings. Where the comma is the decimal mark (Spain, much of South America), Excel separates arguments with semicolons. English Excel and Mexican Spanish Excel use commas.
What is the most common DATEVALUE mistake?
If the date comes as "15/03/2024", the day/month order depends on regional settings; the year-month-day format always works.