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

Year on Year Formula

Status
Not open for further replies.

Steve95

MIS
Nov 3, 2004
265
US
Hi All

I need to create a formula which will be placed in the select expert. Currently the formula is like:

{Datefield} in DATE (2005,01,01) to maximum(lastfullmonth)

with this formula at the beginning of every year I got to pull down from BOXi 40+ reports change date year and re-upload, time consuming or what......

What I want to be able to do is have a formula which will allow the years to roll as per norm and the second part of the formula still referring to the last fullmonth.

Please can you advise?

Many Thanks in advance
 
Year(Date) = Year(currentdate)

or maybe

Year(Date) = Year(currentdate)-1

A separate test for your last full month.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Thanks for the formula, but this formula will not resolve my issue....

Any other ideas?

Many Thanks
 
Try:

if month(currentdate) <> 1 then
{table.date} in minimum(yeartodate) to maximum(lastfullmonth) else
{table.date} in date(year(currentdate)-1, 1,1) to date(year(currentdate)-1,12,31)

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top