>In VFP it's easy to reference the last month of data by using DATE()-31 but when I try this with SQL (ver. 6.5) GETDATE()-31, I get an error.
>
>How can you use MS SQL's GETDATE() and subtract (or add) a specific number of days?In T-SQL you have the DATEADD(datepart,number,date) function instead.
Params:
datepart would be day (dd)
number would be 31
date would be GETDATE()