Eine Einführung in

SQL

How to format a date in the like yyyymmdd

DB2

Display the dates that Madness played Top of the Pops, show the dates in the format yyyymmdd.

The SQL standard gives us the EXTRACT function to get year, month and day. We can use the LPAD function to pad these numbers to 2 digits.



Specific to DB2
The iso format is close. The replace function may be used to remove the '-' characters.