---
url: /cube-functions/datevalue.md
description: Converts a text string representing a date to a date value.
---

# DATEVALUE&#x20;

Converts a text string representing a date to a date value.

```js
DATEVALUE(date_text)
```

#### Parameters

* `date_text` - The text string representing a date to convert to a date value in yyyy-mm-dd format.

#### Examples

```js
DATEVALUE("2023-04-17")

```

**Result:** `45033`

**Note:** Converts the text string '2023-04-17' into a date value.
