Abhinav Khichar Abhinav Khichar - 5 months ago 35
SQL Question

How to convert timestamp to date in SQL?

Image: http://i.stack.imgur.com/CyyHo.jpg

I have a dataset as shown in the image. I want to use the values of created_date column as

format. How can i do that?


Column values does not seems to be a TimeStamp. Use the below script to make the values as datetime .

    SELECT credits,amount,city,
                  +' '+SUBSTRING(created_date,9,2)
                  +':'+RIGHT(created_date,2)) Created_Date
    FROM YourTable