Eine Einführung in

SQL

Format a date and time.

Mimer SQL
Many engines support the SQL standard - see Mimer for details.


Specific to Mimer SQL
Create a string representing a date to a particular format The Standard provides us with the EXTRACT function that can be used however many engines provide a more convenient alternative.

EXTRACT EXRESSION as: EXTRACT(MONTH FROM wk)
other components that may be extracted:

  • YEAR
  • MONTH
  • DAY
  • HOUR
  • MINUTE

In this example we use CAST in order to build up a date in the UK format dd/mm/yyyy