Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rolling 6 months selection 1

Status
Not open for further replies.

Cort

MIS
Apr 16, 2002
154
US
Hello all:

CR 8.5

Here is my current selection formula and I need to modify it some.

{dbo_CONTRACT_CURR.CLOSED_DATE} in YearToDate

Which worked great last year but I need to modify it to a rolling 6 months based on the last full month. I know it's probably pretty easy but I just can't wrap my head around it. Something like:

{dbo_CONTRACT_CURR.CLOSED_DATE} >= (LastFullMonth,-6)

but that doesn't seem to want to work.

Any help is greatly appreciated
 
Hey there Cort,

DateAdd('m',-6,CurrentDate)

is probably what you're looking for.

Naith
 
...unless you mean that you want 6 months starting from the last full month, which would be something like:

(DateAdd('m',-6,Date(Year(CurrentDate),Month(DateAdd('m',-1,CurrentDate)),1)))

Sorry, I didn't pay close enough attention to the question.

Naith
 
Thanks Naith, as always.

Interesting that you can't just plug in LastFullMonth into the 1st formula isn't it?

But it does work perfectly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top