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

Previous Full Year Date Range Formula

Status
Not open for further replies.

pcollins1

Technical User
Jun 19, 2002
72
US
I need a Formula that will calculate the previous full year date range of 01/01/year to 12/31/year. My formula is:

if {Table.date}>=dateadd{"yyyy",-1,#2006/1/1} and {Table.date}<=dateadd{"yyyy",-1,#2006/12/31} then {Table.qty}

I do not want to have to key in the dates in the formula, but I have not found a way to just look at todays year range and subtract 1. Something like LastYearYTD formula, but only for the previous year Jan 1 to Dec 31 not up to today.
 
You could use:

if {table.date} in date(year(currentdate)-1,1,1) to date(year(currentdate)-1,12,31) then {table.qty}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top