I’ve been trying to create these pre-defined filters capturing different time periods and keeps creating errors!!!
MTD (First of the month till today)
YTD (January till today)
I am using BOXI SP3.2 with SQL 2005.
I used “BETWEEN
convert(datetime,convert(varchar,dateadd(mm,-12,dateadd(dd,-datepart(dd,getdate())+1,getdate())),103),103)
AND
convert(datetime,convert(varchar,dateadd(dd,-datepart(dd,getdate()),getdate()),103),103”