Given the date from the date to the date and the system of the fiscal year, I want to get the entire duration of the gap within and taking into account the date based on the system of the fiscal year. The following are examples:
Example 1: Fiscal Year System: April to March
From Date: Jan-05-2008 Date: May-15-2008
Based on the fiscal year system, the duration should be divided into:
Jan-05-2008 to Mar-31-2008 Apr-01-2008 to May-15-2008
Example 2: Fiscal Year System: April to March
From Date: Jan-17-2008 Date: May-20-2009
Based on the fiscal year system, the duration should be divided into:
Jan-17-2008 to Mar-31-2008 Apr-01-2008 to Mar-31-2009 Apr-01-2009 to May-20-2009
We are looking for an approach / algorithm to solve this problem in PostgreSQL 8.2.
Hi,
Gnanam
source share