clear markdown compare help donate comments/suggestions/bugs a leap of faith?
clear markdown donate comments/suggestions/bugs a leap of faith?
By using dbfiddle, you agree to license everything you submit by Creative Commons CC0

declare @quarter int, @year int, @date date set @quarter = 4 set @year = 2018 set @date = cast(@year as varchar(4)) + '0101' set @date = dateadd(quarter, 1 - 1, @date) print @date set @date = cast(@year as varchar(4)) + '0101' set @date = dateadd(quarter, 2 - 1, @date) print @date set @date = cast(@year as varchar(4)) + '0101' set @date = dateadd(quarter, 3 - 1, @date) print @date set @date = cast(@year as varchar(4)) + '0101' set @date = dateadd(quarter, 4 - 1, @date) print @date
2018-01-01 2018-04-01 2018-07-01 2018-10-01