Q&A for professional and enthusiast programmers
declare @dt as date; set @dt = '2023-08-31'; select datediff(day, getdate(), @dt);