Skip to Content
0
Former Member
May 24, 2010 at 04:33 PM

Pull date range from parameter

27 Views

So I have a formula that has hard coded date ranges in it.

Whileprintingrecords;

shared numbervar YTDQTY;

if {ARHDRH.Invoicedate} in date(2010, 01, 01) to date(2010, 12, 31)

then {ARLINH.Qtyshipped}

I also have another formula that is basically the same thing, just for last year.

I would like to modify this formula and have it grab the dates that are entered in a date range parameter. I then could take this and just subtract a year off it, this way the user can just enter in whatever dates they choose and it will also subtract one year. I just don't know how to have to grab my parameters date. I remember seeing a formula kind of like this

DateValue (year(minimum({?DateRange}))

But I tried entering it in like so

DateValue (year(minimum({?DateRange})) to DateValue (year(maximum({?DateRange}))

And it just said that I am forgetting the ")"

Any ideas?