DB2 Date format
One more solution REPLACE (CHAR(current date, ISO),'-','')
SELECT VARCHAR_FORMAT(CURRENT TIMESTAMP, 'YYYYMMDD')
FROM SYSIBM.SYSDUMMY1
Should work on both Mainframe and Linux/Unix/Windows DB2. Info Center entry for VARCHAR_FORMAT()
.
select to_char(current date, 'yyyymmdd') from sysibm.sysdummy1
result: 20160510