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

show columns within set date paramters

$
0
0

Hi there,

I have a stored procedure to show data.  I have one column in it, that I have convereted from a varchar to a datetime column.  However I only want to show the values if the @ToDate is equal to that date plus 14 days.  So yes there is a date parameter to select a @FromDate and a  @ToDate.

So I cannot set it down to one particular date, as it depends on what the end user wants.

Is there a line of code to only show from the @FromDate value +14 against test column?

Or is it easier to create a seperate column to calculate the 14 days ahead of the test column and then do a

@ToDate between (test column) and (test14 column)

Any help would be gratefully recieved.

 


Viewing all articles
Browse latest Browse all 23857

Trending Articles



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