> ## Documentation Index
> Fetch the complete documentation index at: https://docs.e6data.com/llms.txt
> Use this file to discover all available pages before exploring further.

# DATE

> Converts a value to DATE, with the same behavior as CAST(value AS DATE).

<div className="e6-meta"><span className="e6-eyebrow e6-eyebrow--quiet">Scalar function</span></div>

NULL input returns NULL; unsupported conversion and invalid text follow CAST/ANSI behavior.

## Syntax

### Scalar

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
date(value)
```

## Arguments

| Name | Type | Required | Description |
| - | - | - | - |
| value | STRING, DATE or TIMESTAMP | Yes | Value to convert. STRING values must parse as dates; TIMESTAMP conversion discards the time of day. Numeric input is not accepted. |

## Returns

* Type: DATE
* NULL behavior: NULL input returns NULL; unsupported conversion and invalid text follow CAST/ANSI behavior.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Supports window usage | No |
| Exact result | Partial (A timestamp-to-date conversion can discard its time component.) |

## Usage notes

* DATE(value) has the same effect as CAST(value AS DATE).
* Deterministic: The same inputs and settings produce the same result.

## Examples

### Typical behavior

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT date('2024-03-15') AS "value";
```

| value |
| - |
| 2024-03-15 |

### Remove the time of day

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT date(TIMESTAMP '2024-03-15 23:59:59') AS date_only;
```

| date\_only |
| - |
| 2024-03-15 |

## Related functions

* [cast](/query/sql/functions/conditional/cast)
* [try\_cast](/query/sql/functions/conditional/try_cast)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.