Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

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

$
0
0

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?


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>