Hi,
Looking for a quick way to convert a date from say '2006-10-15' to a format of 'Oct-06'. Is there any way to do this without tedious case statements?
Using UDB for z/OS390 Version 7...
I am Sure there is a more elegant way than this:
SELECT CHAR(CASE MONTH(CURRENT DATE)
WHEN 01 THEN 'Jan'
WHEN 02 THEN 'Feb'
WHEN 03 THEN 'Mar' --etc
ELSE 'MMM' END || '-' || SUBSTR(CHAR(YEAR(CURRENT DATE)),3,2))
FROM SYSIBM.SYSDUMMY1
Thanks in advance
Looking for a quick way to convert a date from say '2006-10-15' to a format of 'Oct-06'. Is there any way to do this without tedious case statements?
Using UDB for z/OS390 Version 7...
I am Sure there is a more elegant way than this:
SELECT CHAR(CASE MONTH(CURRENT DATE)
WHEN 01 THEN 'Jan'
WHEN 02 THEN 'Feb'
WHEN 03 THEN 'Mar' --etc
ELSE 'MMM' END || '-' || SUBSTR(CHAR(YEAR(CURRENT DATE)),3,2))
FROM SYSIBM.SYSDUMMY1
Thanks in advance