mcfarlandparkway
SSCertifiable
Points: 7701
More actions
March 19, 2020 at 9:54 pm
#3735716
@Date1 = '20150630'
DATEADD(m,6, @Date1) < DATEADD(m,-12,GETDATE())
Ignore this, i got the answer after validating.
Phil Parkin
SSC Guru
Points: 247180
March 19, 2020 at 10:03 pm
#3735719
With >7000 points, how can you claim to be "new to SQL Server"?
Please attempt your own explanation... then we can check it for you.
Jonathan AC Roberts
SSCoach
Points: 18407
March 19, 2020 at 10:56 pm
#3735728
DECLARE @Date1 datetime = '20150630'SELECT DATEADD(m,6, @Date1)
'2015-12-30 00:00:00.000'
SELECT DATEADD(m,-12,GETDATE())
'2019-03-19 22:54:19.727'
'2015-12-30 00:00:00.000' < '2019-03-19 22:54:19.727' = TRUE
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply