Thursday, April 10, 2014

changing date format from yyyy/mm/dd to mm/dd/yyyy

I use the following statment:

MAX(case when A.[NGT_KYC_QUES_PROPERTY]='ResolvedDate' then CAST(SUBSTRING([NGT_KYC_QUES_ANSWER],5,2) + '-' + SUBSTRING([NGT_KYC_QUES_ANSWER],7,2) + '-' + SUBSTRING([NGT_KYC_QUES_ANSWER],1,4) AS DATE) ELSE '' END)AS ResolvedDate,


to change date in text field (20140303T144253.253 GMT) to the following format:



2014/03/03



I would like to put it in the following format 03/03/2014 mm/dd/yyyy.



is it possible to do this all in one statement?


No comments:

Post a Comment