I am looking for a SQL function to use in a BOE Report to generate data from the month selected in the prompt and the previous six months.
views:
34answers:
1
A:
Lookup DATEADD if this is TSQL. I might not have the syntax exact from memory, but sample below s/b pretty close.
Also -- "selectedMonth" should be an entire date (mm/dd/yy), not just a month number.
SELECT
*
FROM
table
WHERE [myDate] > DATEADD(month,-6,@SelectedDate)
dave
2010-08-06 15:03:10