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

# FORMAT_DATE

> Formats a date as a string.

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

**Aliases:** [`date_format`](/query/sql/functions/date-time/date_format)

NULL value or NULL format yields NULL. Invalid format/value conversion can raise an error.

## Syntax

### Scalar

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

### Date format form (scalar)

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

* DATE\_FORMAT uses the configured SQL dialect’s date-formatting rules.

## Arguments

### Scalar

| Name | Type | Required | Description |
| - | - | - | - |
| value | DATE | Yes | Temporal value to format. |
| format | STRING | Yes | Java/MySQL-compatible formatting pattern. |

### Date format form

| Name | Type | Required | Description |
| - | - | - | - |
| value | DATE or TIMESTAMP | Yes | Temporal value to format. |
| format | STRING | Yes | Java/MySQL-compatible formatting pattern. |

## Returns

* Type: STRING
* NULL behavior: NULL value or NULL format yields NULL. Invalid format/value conversion can raise an error.

### Scalar, Date format form

* Type: STRING
* NULL behavior: NULL value or NULL format yields NULL. Invalid format/value conversion can raise an error.

## Properties

| Property | Value |
| - | - |
| Deterministic | Yes |
| Exact result | Yes |

## Usage notes

* E6 argument order is (value, format), not BigQuery's (format, value).
* The format can be a constant or a column with a different format for each row.
* DATE\_FORMAT takes (value, format) and follows the same NULL and format rules. The UTC-time limitation below also applies.
* DATE\_FORMAT takes (value, format) in both the Databricks and E6 SQL dialects. Both forms accept the same Java-style patterns and return STRING.

## Examples

### Basic example

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT format_date(DATE '2024-03-15','yyyy-MM-dd') AS result;
```

| result |
| - |
| 2024-03-15 |

### Alias calling form: DATE\_FORMAT

```sql theme={"theme":{"light":"github-light","dark":"github-dark"}}
SELECT date_format(DATE '2024-03-15','yyyy-MM-dd') AS result;
```

| result |
| - |
| 2024-03-15 |

## Limitations

* Calendar calculations use the timestamp’s stored UTC time. They do not adjust it to the timestamp’s named time zone.


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