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

CR 8.5 Date Math

Status
Not open for further replies.

tmozer

Programmer
Sep 11, 2004
66
US
I have create a couple versions of a daily report that tracks new assignments, completed assignments and total pending assignments for several sections. I would like to include on the report accumulated activity for the current week (week runs Monday to Sunday), current month, current quarter (July through September is 1st quarter, etc.) and current year. Therefore given a single inputed date, I need to calculate when the week started, the month started, the quarter started and the year started to gather the desired data.

I am using Crystal Reports 8.5. Could someone give me some example formulas I could use to calculate the above. Assume the starting date is SDATE......

ted.mozer@gw.njsp.org
 
I have a few posts along these lines here.

A big kid approach is to consider a time dimension table:

FAQ767-4532

Here's a previous thread:

thread149-540531

As for computing time periods, that's fairly basic, here's a more sophisticated quarter example:

thread767-480932

And you don't just need the start date for the periods referenced, you need the end dates as well.

I've posted exactly this somewhere here before, I just can't find it now...

-k
 
Ahhh, here it is:

thread149-539351

You can cannibalize the period creation for your use, this was for parameters.

In you case you'd base Running Totals (evaluate use a formula) or conventional formulas limited by the dates desrbed herein.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top