Dtunn
Dtunn

Reputation: 1

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

Upvotes: 0

Views: 164

Answers (0)

Related Questions