Results 1 to 2 of 2
Thread: Business Quarters (2000)
2006-09-18, 12:15 #1
- Join Date
- Nov 2001
- Atlanta, Georgia, USA
- Thanked 0 Times in 0 Posts
Business Quarters (2000)
I'm looking for a way to calculate a set of dates for reports, for our business quarters which are.
4/1/xxxx to 6/30/xxxx
7/1/xxxx to 9/30/xxxx
10/1/xxxx to 12/31/xxxx
1/1/xxxx to 3/31/xxxx
On any given date that the report is run I need it to calculate valid start and end dates for the last 4 quarters.
Then I will take those dates and run the 4 reports.
2006-09-19, 00:36 #2
- Join Date
- Dec 2000
- Sacramento, California, USA
- Thanked 1 Time in 1 Post
Re: Business Quarters (2000)
It might be simpler to calculate the calendar quarter for each date and filter on that. Here's a function that demonstrates the effect of the quarter format:
<code>Public Function GetQuarter(ByVal currDate As Date) As Integer
GetQuarter = Format(currDate, "q")
You would naturally need to add handling for the year of the date to make sure you didn't get mixed results.
Your mention of "valid" start and end dates makes me wonder, however. From your list, you already know the start and end dates of the quarters, you just need to substitute the proper year. Am I missing something?Charlotte