Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

Converting to date

$
0
0

I have a table with a field that is (nvarchar(4000)), this field takes different types of data (text and numbers, and dates). I have dates stored as follows:

1) 20120824T165728.534 GMT

2) 20130824

This data is coming from different place where I have no control over it. I tried convert and cast functions, and did not work, may be because the dates are stored in the format of "yyyymmdd". how can I convert the 2 examples above to real short date; mm/dd/yyyy?
thanks


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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