All Forums Database
n4247558 3 posts Joined 07/06
18 Jul 2006
Date format - FMDD?

In oracle, if date format is set to be "dd-mm-yyyy" -> 01-12-2006if it's set to be "fmdd-mm-yyyy" -> 1-12-2006.But how about in teradata......i wanna to use the function like 'fmdd', how to make it?

vinod_sugur 22 posts Joined 04/05
19 Jul 2006

The query helps in getting the desired output but the string format not able to convert back to date.select CASEWHEN SUBSTRING(CAST(DATE -11 AS FORMAT 'DD') FROM 1 FOR 1 ) = 0 THEN SUBSTRING(CAST(DATE -11 AS FORMAT 'DD-MM-YYYY') FROM 2) ELSE SUBSTRING(CAST(DATE -11 AS FORMAT 'DD-MM-YYYY') FROM 1) END;

You must sign in to leave a comment.