Results 1 to 2 of 2
  1. #1
    3 Star Lounger
    Join Date
    Nov 2001
    Location
    Atlanta, Georgia, USA
    Posts
    274
    Thanks
    0
    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.
    Thanks,
    Scott

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    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")
    End Function</code>

    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •