I'm using SQL Server 2014. The last line causes causes an overflow error.
Why?
DECLARE @CurrentDateTime datetime
DECLARE @PreviousYearDateTime datetime
DECLARE @ModifiedStartDateTime datetime
DECLARE @YearsYear int = 2015
SET @CurrentDateTime = '2016-08-29 19:13:30.840'
SET @PreviousYearDateTime = CONVERT(datetime, DATEADD(YEAR, -1, @CurrentDateTime))
-- For the "startdate" - just use the previous "startdate".
SET @ModifiedStartDateTime = @PreviousYearDateTime
-- Set the 'year' to the year value.
SET @ModifiedStartDateTime = DATEADD(YEAR, @YearsYear, DATEADD(YEAR, -DATEPART(YEAR, @ModifiedStartDateTime), @ModifiedStartDateTime))