Scalar function
Aliases: date_format
NULL value or NULL format yields NULL. Invalid format/value conversion can raise an error.
Syntax
Scalar
- DATE_FORMAT uses the configured SQL dialect’s date-formatting rules.
Arguments
Scalar
Returns
- Type: STRING
- NULL behavior: NULL value or NULL format yields NULL. Invalid format/value conversion can raise an error.
- Type: STRING
- NULL behavior: NULL value or NULL format yields NULL. Invalid format/value conversion can raise an error.
Properties
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
Limitations
- Calendar calculations use the timestamp’s stored UTC time. They do not adjust it to the timestamp’s named time zone.
Last modified on October 15, 2026