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

how to substract dates from a year?

$
0
0

For Example something like below

DECLARE @StartDatedatetime 


SET @StartDate = '20100101'
SET @EndDate = '20130117'


@StartDate = 

@StartDate - 5

the outout should be 20091226


Viewing all articles
Browse latest Browse all 7129

Trending Articles



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