X amount of days from date variable
In my report I have a date variable named endDate and I'm filtering my results based on anything earlier than that date. What expression can I use to subtract 120 days from endDate? I tried using getdate(endDate) - 120 and other variants
to no avail. Any help is appreciated.
May 18th, 2011 7:28pm
Try this - DATEADD(day,120,@endDate)
Free Windows Admin Tool Kit Click here and download it now
May 18th, 2011 8:03pm
ttp://i52.tinypic.com/160v1qp.jpg
And at runtime it says: "Argument not specific for parameter 'DateValue' of 'Public Function Day(DateValue As Date) As Integer'.
May 19th, 2011 1:58pm
Try using DateAdd("dd",-120,@endDate)
Or
DateADd("d",-120,@endDate)
HTH,
Ram
Free Windows Admin Tool Kit Click here and download it now
May 19th, 2011 2:03pm
Try using DateAdd("dd",-120,@endDate)
Or
DateADd("d",-120,@endDate)
HTH,
Ram
This worked:
=DATEADD("d",-120,Parameters!endDate.Value)
Thank you for your help!
May 19th, 2011 2:54pm