By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,466 Members | 1,136 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,466 IT Pros & Developers. It's quick & easy.

Convert Date Format in sql server

P: 22
Hello all,

Previously in my 'date' column the values are like below.
Date
------
wed o5/23/2013
fri 03/20/2014
------------
------------
etc......
From this type of data i got one output that is
Date
--------
05/23/2013
03/20/2014
---------
---------
etc......
by using the function RIGHT(CONVERT(VARCHAR(8), Date, 103), 10).


Now from this getting data i want the result as dd/mm/yyyy format.
that is
Date
------
23/05/2013
20/03/2014
---------
---------
etc......

How i will get this type of result.
Please any one guide me to do this one.

Thanks In Advance,
Phani Kumar.
May 1 '14 #1
Share this Question
Share on Google+
2 Replies


Rabbit
Expert Mod 10K+
P: 12,430
Right now your data is in a string data type, first you need to convert it to a date data type, and then convert it back to a string data type with the format 103.
May 1 '14 #2

P: 22
Thanks Rabbit.
I solved my problem with your helpful guidance.
May 5 '14 #3

Post your reply

Sign in to post your reply or Sign up for a free account.