DATE_FORMAT

Format date/timestamp as string.

Category: Date & Time Functions

Syntax

DATE_FORMAT(date, pattern)

Arguments

  • date temporal Date, time, or timestamp value to evaluate.
  • pattern varchar [constant] Format string used to render the temporal value as text. Must be a constant expression.

Returns

varchar — Returns the computed result as varchar.