Using Between operator with dates

I have a report where I pull in the dates of the previous 30 days. On one tab, I only want to display the last 14 of the dates. I created this formula in the date column:

= Between ((RelativeDate(currentdate(),-1),RelativeDate(currentdate(),-15))

I checked both RelativeDate pieces separately to ensure they evaluated correctly, and they do. The first one evaluates to yesterday (06/28/2004) and the other to 15 days ago (06/14/2004).

But the dates in the column become 01/01/1900 in all rows, not the last 14 days as expected, and there were only about 7 rows.

Any ideas why this does not work and what the alternative is?


lindacaron :us: (BOB member since 2002-07-16)

Linda,

I was able to get the following statement to work:

= If Between (RelativeDate(CurrentDate() ,-15) ,RelativeDate(CurrentDate() ,5) )Then 1 Else 2

Regards,

Steve


SteveBickerton :canada: (BOB member since 2002-08-15)

Steve,
Thank you. I bet my problem was the order of the dates in the ( ).


lindacaron :us: (BOB member since 2002-07-16)

I think so too. glad it worked


SteveBickerton :canada: (BOB member since 2002-08-15)