Solved

Crystal - Return total weeks and current week - Fiscal Quarter

Posted on 2013-11-14
6
522 Views
Last Modified: 2013-11-14
Need some help with the following:

I need to return the total weeks for a given fiscal period and the current week

example: Fiscal period 3  (9/29/2013 - 12/28/2013)

Total Weeks:  13
Current week: 6

I will have a formula in the report that will list the fiscal period quarter dates:

example:

Fiscal period 1: 3/31/2013 - 6/29/2013
Fiscal period 2: 6/30/2013 - 9/28/2013
Fiscal period 3: 9/29/2013 - 12/28/2013
Fiscal period 4:  12/29/2014-3/29/2014
0
Comment
Question by:kelsanit
  • 4
  • 2
6 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
Comment Utility
I don't know how you are determining the fiscal periods but you can get the weeks with this.  It will always be 13 unless they mess up the dates

DateDiff("ww",{Fiscal Period start},{Fiscal Period End}+1)

Similarly for this week

DateDiff("ww",{Fiscal Period start},Today)

mlmcc
0
 

Author Comment

by:kelsanit
Comment Utility
yes, you are correct. There will also be a total of 13 weeks. So how do I determine the current week I am in. They only way I have to pull date is using formula for current date.
0
 

Author Comment

by:kelsanit
Comment Utility
I tried this formula and got the following

DateDiff("ww", date (9/29/2013) ,Today)

returned 5942

I am wanting it to return 6
0
Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

 

Author Comment

by:kelsanit
Comment Utility
tried this formula and returned value of 1

DateDiff("ww", date (9/29/2013), date(12/28/2013)+1)
0
 

Author Comment

by:kelsanit
Comment Utility
I figured it out. had to out - had to use the following

DateDiff("ww", {@FiscalPeriod_StartDate} ,currentdate)


fiscalpeirod start date: #9/29/2013#

thank you for your help.
0
 
LVL 100

Expert Comment

by:mlmcc
Comment Utility
The Date function expects to see 3 numbers for the Year, month, day or a string in the form of April 23, 2013 or a date/datetime field from the database

mlmcc
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

In database programming, custom sort order seems to be necessary quite often, at least in my experience and time here at EE. Within the realm of custom sorting is the sorting of numbers and text independently (i.e., treating the numbers as number…
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now