3 Replies Latest reply on Jun 29, 2016 1:05 AM by bishal singh

# Create Time Periods 30 days prior to today

Hi

How do i create two time periods.

1st time period - all data in the past 30 days from today

2nd time period - all data 30 days past the last date of the first time period

any help would be greatly appreciated.

I have attached my formula - which does not appear to be working...

Thanks,

Anna

• ###### 1. Re: Create Time Periods 30 days prior to today

Hi Anna

have you thought about using the DATEDIFF() function

Something like this...

IF DATEDIFF('day',[your date],TODAY()) >= -30 AND DATEDIFF('day',[your date],TODAY()) <0 THEN ...

ELSEIF DATEDIFF('day',[your date],TODAY()) >= -60 AND DATEDIFF('day',[your date],TODAY()) < -31 THEN...

ELSEIF....

ELSE

END

FYI - your formula, you only need the =, the other is un-required, the below effectively works is True Post Date = TODAY() only

Does that help?

Cheers

Mark

• ###### 2. Re: Create Time Periods 30 days prior to today

You can of course tweak the logic tests as you need, the above may not be perfect, it's to demo the concept

• ###### 3. Re: Create Time Periods 30 days prior to today

plz used