WinSQL adding numbers to a date

131 views Asked by At

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

0

There are 0 answers