Quantcast
Channel: Forum Getting started with SQL Server
Viewing all articles
Browse latest Browse all 7129

String to Datetime

$
0
0

How to derived string to datetime (dd/mm/yyyy)

Input Date :

Start Date 

15/06/2015

30/06/2015

NULL

2015/06/24

Some date are in format dd/mm/yyyy I want to keep them as it is , but I want to convert the NULL one and 2015/06/24 to 24/06/2015.

How can I do this .

I tried this :

select distinct CONVERT(VARCHAR(100),[Start Date],103) from it_projects_src

 but doesnt work with "2015/06/24"


Viewing all articles
Browse latest Browse all 7129

Trending Articles



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