Google Sheets function · Date
DATEVALUE in Google Sheets: syntax and examples
DATEVALUE reads a text such as 2026-11-29 and returns the matching date serial number. Use it when dates arrive as text from an import or a CSV, so that subtraction, sorting and filtering work.
Syntax
DATEVALUE(date_string)
Arguments
| Argument | Type | Required | What it does |
|---|---|---|---|
date_string | string | yes | A date written as text in a format Sheets recognises, such as 2026-11-29. |
Examples
The examples use this table, starting in A1:
| Date text | Days |
| 2026-11-29 | 30 |
| 2026-12-25 | 0 |
=DATEVALUE("2026-11-29")Result: 46355
An ISO date string becomes a date serial number.
Run in a Google Sheet (English US locale) on .
=DATEVALUE(A3)-DATEVALUE(A2)Result: 26
Days between two dates stored as text.
Run in a Google Sheet (English US locale) on .
=DATEVALUE("2026-11-29")+B2Result: 46385
Add 30 days to a text date.
Run in a Google Sheet (English US locale) on .
=ISNUMBER(DATEVALUE("2026-11-29"))Result: TRUE
The result is a real number, so it works in arithmetic.
Run in a Google Sheet (English US locale) on .
=DATEVALUE("2026-11-29")-DATEVALUE("2026-11-01")Result: 28
Both dates written directly as text: 28 days apart.
Run in a Google Sheet (English US locale) on .
Common errors
- Text that is not a recognisable date returns #VALUE!.
- The argument must be text. A number that is already a date serial is not accepted.
- The result is a plain number. Format the cell as a date, or the cell shows something like 46355.
- Recognised text formats depend on the locale: 11/29/2026 works in en_US but returns #VALUE! in ro_RO. ISO year-month-day is the safest.
Compared with Excel
Same syntax in Excel.