Skip to content
Advertisement

Fiscal year and fiscal quarter

I have a table where I store order dates YYYY-MM_DD.

How do I create fiscal year and fiscal quarter with the following requirements: Fiscal years:

  1. start date for Fiscal_Year_2000 is 1999-07-01 and ends on 2000-06-31
  2. start date for Fiscal_year_2001 is 2000-07-01 and end on 2001-06-31

Fiscal Quarters:

  1. Fiscal_Quarter_1 for example FY2000 starts 1999-07-01 and ends 1999-09-31
  2. FQ2, FQ3, FQ4 for FY 2000
  3. FQ1/2/3/4 for FY2001

I tried

I am getting some very odd results. Any help is highly appreciated.

Output should be something like:

Advertisement

Answer

Just add six months and use the year. For instance, if you want FY 2000:

If you want the FY year and quarter, use the same idea:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement