Skip to main content
Scalar function
Aliases: date_format NULL value or NULL format yields NULL. Invalid format/value conversion can raise an error.

Syntax

Scalar

Date format form (scalar)

  • DATE_FORMAT uses the configured SQL dialect’s date-formatting rules.

Arguments

Scalar

Date format form

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

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

Alias calling form: DATE_FORMAT

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