# DATEVALUE in Google Sheets: syntax and examples

URL: https://goingstellar.ro/reference/sheets/datevalue/

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

- `date_string` (string, required: 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 2026-11-29.

```
=DATEVALUE(A3)-DATEVALUE(A2)
```

Result: `26`

Days between two dates stored as text. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=DATEVALUE("2026-11-29")+B2
```

Result: `46385`

Add 30 days to a text date. Run in a Google Sheet (English US locale) on 2026-11-29.

```
=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 2026-11-29.

```
=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 2026-11-29.

## 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.

## Related functions

- [DATE](https://goingstellar.ro/reference/sheets/date/)
- [VALUE](https://goingstellar.ro/reference/sheets/value/)
- [TEXT](https://goingstellar.ro/reference/sheets/text/)
- [DATEDIF](https://goingstellar.ro/reference/sheets/datedif/)
- [TODAY](https://goingstellar.ro/reference/sheets/today/)

## Sources

- [DATEVALUE (Docs Editors Help)](https://support.google.com/docs/answer/3093039)

