Wednesday, January 19, 2011

DB2 function to change date formats

the query to change the date into different date formats  in DB2 using CHAR function as follows

SELECT CHAR(EMP_JOIN_DATE, USA) FROM EMP;

Other Formats are ISO(CCYY-MM-DD), USA(MM/DD/CCYY), EUR(DD.MM.CCYY) and JIS(CCYY-MM-DD)

No comments:

Post a Comment