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

Defining Quarters 1

Status
Not open for further replies.

jcl5

IS-IT--Management
Dec 6, 2002
89
GB
I need to create a formula to calculate four rolling quarters based on the year to date.
Q1 runs from 1 July 2003 to 30 Jun 2004
Q2 runs from 1 Oct 2003 to 30 Sep 2004
Q3 runs from 1 Jan 2004 to 31 Dec 2004
Q4 runs from 1 Apr 2004 to 31 Mar 2005

I don't want to hard code the dates as I need the report to run year after year.

Many thanks

jcl5
 
In Crystal 8.5, you could set the eight dates as formula fields, based on a ninth formula field with the current year. Thus @currentyear is
DatePart("yyyy", currentyear)

The first date, 1 July 2003, would be defined as
DateValue(@currentyear-1, 7, 1)

The next, 30 Jun 2004, is
DateValue(@currentyear, 6, 30)

and so on. Then you test for the ranges.

Madawc Williams
East Anglia, Great Britain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top