I have a column with this format 20150228
and I need to change it to 02/28/2015
. Is there any function in SQL to do it.
Thanks
I have a column with this format 20150228
and I need to change it to 02/28/2015
. Is there any function in SQL to do it.
Thanks
You can use this assuming the date is stored as a varchar:
SELECT CONVERT(VARCHAR(50),CONVERT(DATE,'20150228',112),101)
It returns:
02/28/2015