i have date as follows
2014-01-04 00:00:00.000 (yyyy-dd-mm)
from the above format, i want output as follows
2014-04-01 (yyyy-mm-dd)
for that how can i do using sql server.
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Nirmal KumarCPosted Nov 14, 2014, 6:10 AM
ProcessDate(yyyy/dd/mm)this format Below Data
Thanks
Espen SkeiePosted Nov 14, 2014, 5:26 AM
How about this code:
Kind regards
Espen
Joginder BangerPosted Nov 14, 2014, 5:14 AM
declare @dates table (parsed date)
SET DATEFORMAT ymd;
insert into @dates
select GETDATE()
select * from @dates
output
parsed
2014-11-14