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)
| Argument | What it is |
|---|---|
| date_text | A 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.
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.
In C2, calculate each employee’s years of service as of the cutoff date in I1.
| A | B | C | D | E | F | G | H | I | J | |
|---|---|---|---|---|---|---|---|---|---|---|
| 1 | Employee | Hired | Years | Last payment (text) | Last payment | ISO week | Cutoff | 12/31/2025 | ||
| 2 | Ana | 03/15/2019 | 2025-11-28 | |||||||
| 3 | Beto | 07/01/2022 | 2025-12-05 | |||||||
| 4 | Carla | 01/20/2015 | 2025-12-12 | |||||||
| 5 | Dani | 10/07/2024 | 2025-12-19 | |||||||
| 6 | Elena | 12/31/2020 | 2025-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.