'WinSQL adding numbers to a date

I'm trying to query between two dates using WinSQL where I add a number of days to a field. I can't find the function to do it. I think it should be dateadd but that function does not seem to work in WinSQL.

select * from table where a.date1 >=b.date2 and a.date1 <=dateadd(dd,89,b.date2)

or

select * from table where a.date1 >=b.date2 and a.date1 <=date2+89

select * from table where a.date1 >=b.date2 and a.date1 <=dateadd(dd,89,b.date2)

or

select * from table where a.date1 >=b.date2 and a.date1 <=date2+89

I get an error with both



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source