Subtract days, weeks etc in SSRS
Yet another useful date subtraction technique, this time via SSRS and expressions. If you’re not using SQL datasets to calculate your dates and times, then this will be of use to you:
=DATEADD(DateInterval.Year, -1, Today())
=DATEADD(DateInterval.Year, -1, Fields!StartDate.Value)
=DATEADD("M",-1,Today())
=DATEADD("M",-1,Fields!StartDate.Value)
=DATEADD(DateInterval.WeekOfYear, -1, Today())
=DATEADD(DateInterval.WeekOfYear, -1, Fields!StartDate.Value)
=DATEADD("D", -1, Today())
=DATEADD("D", -1, Fields!StartDate.Value)
Really useful thank you – solved an annoying problem for me very quickly.
You’re most welcome, glad it helped 🙂