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

Need to Split a Date Column into 2 solumn as Start Date and End Date

$
0
0

I need help over this thing. I am working on a table which looks like

Date          Dateofyear2014-01-0112014-01-0222014-01-0332014-01-0442014-01-055......2014-12-31365

Now i need to Run a query on this table to show me result after taking input from user (store proc ) if user enters 2 then

StartDate        EndDate2014/01/012014/07/012014-07-022014-12-31

and if user enter 5 then

StartDate       EndDate2014/01/012014-03-142014-03-152014-05-262014-05-272014-08-072014-08-082014-10-192014-10-192014-12-31


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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