Best method to check between 2 dates to see if they are within exactly 3 months of each other using T-SQL.
For example if I had these 2 dates below I want to check if @Date1
is within 3 months of @Date2
and vice versa.
DECLARE @Date1 DATETIME = '2019-01-15 00:00:00.000'
DECLARE @Date2 DATETIME = '2018-10-23 00:00:00.000'