Hi, Harpreet singh
I'm new teradata , when i was executing below query i saw date
SELECT '12-Aug-12' AS COL1 , CAST(CASE WHEN CHAR_LENGTH(SUBSTRING(COL1 FROM 1 FOR POSITION('-' IN COL1)-1))=1 THEN '0'||COL1 else COL1 end AS DATE FORMAT 'DD-MMM-YY') ;
Result:
12-Aug-12 8/12/1912
I need 2012 instead of 1912.
Who can i change above query.Please suggest me.
↧