DECLARE @BirthDate AS DateTime; SET @BirthDate = '1986-20-09' SELECT DATEDIFF(day, @BirthDate, GetDate()) AS DayNumber;