• Introducing Dark Mode! Switch by clicking on the lightbulb icon next to Search or by clicking on Default style at the bottom left of the page!

RE:JDE Date Format in Cognos

RE:JDE Date Format in Cognos

Somehow it got chop off , hope this work now, try this :
SELECT F4211.SDADDJ, CASE WHEN F4211.SDADDJ = 0 then NULL Else DATE(Case
when SUBSTR(CHAR(F4211.SDADDJ),1,1)='1' then
CONCAT('20',CONCAT(SUBSTR(CHAR(F4211.SDADDJ),2,2),SUBSTR(CHAR(F4211.SDAD
DJ),4,3))) Else
CONCAT('19',CONCAT(SUBSTR(CHAR(F4211.SDADDJ),1,2),SUBSTR(CHAR(F4211.SDAD
DJ),3,3)))
END) END
FROM S102YCGM.PRODDTA.F4211 F4211
Hope this program helps.
Donald Tsim
 
Top