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

Syntax

Date format form (scalar)

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

Arguments

Returns

  • 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

Alias calling form: DATE_FORMAT

Format a timestamp with time fields

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