This relates to my question How to find XXth day of previous month in SQL server?
The fiscal month starts on 26th of each month.
I need to find out from any date:
- The date of the start of the fiscal month (Start_Of_Fiscal_Month)
- The number of days into the fiscal month (Day_Of_Fiscal_Month)
CurrentDate - '2014-04-26' Start_Of_Fiscal_Month = 2014-04-26 Day_Of_Fiscal_Month = 1
CurrentDate - '2014-05-02' Start_Of_Month = 2014-04-26 Day_Of_Fiscal_Month = 7