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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Formula - YTD complete month compared to same period last year

Status
Not open for further replies.

socalvelo

Technical User
Jan 29, 2006
128
US
CR 11
Oracle Server

I need to compare values this year YTD though last complete month to the same period last year.


I'm having trouble writing the date range formula for last year. I would need it to cover LastYearYTD to the last day of the matching complete month last year (13 months ago?).

Thank you

Ed
 
Use a record selection formula like this:

(
{Table.date} in date(year(currentdate),1,1) to date(year(currentdate), month(currentdate),1)-1 or
{table.date} in date(year(currentdate)-1, 1,1) to date(year(currentdate)-1,month(currentdate),1)-1
)

You can use the same language in conditional formulas, e.g., if {table.date} in ...then {table.amount}, etc.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top