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

Date column conversion - yyyy-mm-dd to yyyy-mm-01...please help

$
0
0
Hi,
   I have a date column values like 2013-08-25,2013-08-01,2013-09-01 and 2013-09-005

Now I want to make them in such a way that if the datapart value is more than 1, then it should be 1...
so, the output would be

2013-08-01,2013-08-01,2013-09-01 and 2013-09-01..(i.e..basically all date should be 1)

can you pls tell me the case statment for doing this, I want to use that condition in inner join to join with Date table.

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>