Our company switched from standard end of months (1/31, 2/28, etc) to a quarterly fiscal calander where the months are divided up into 5-4-4 weeks (13 weeks each) for the 4 quarters. Here is an End Of Month table:
Table Name = EOM
Year Month Quarter StartDate EndDate
2011 Jan 1 1/1/2011 2/4/2011
2011 Feb 1 2/5/2011 3/4/2011
2011 Mar 1 3/5/2011 4/1/2011
2011 Apr 2 4/2/2011 5/6/2011
2011 May 2 5/7/2011 6/3/2011
2011 Jun 2 6/4/2011 7/1/2011
2011 Jul 3 7/2/2011 8/5/2011
2011 Aug 3 8/6/2011 9/2/2011
2011 Sep 3 9/3/2011 9/30/2011
2011 Oct 4 10/1/2011 11/4/2011
2011 Nov 4 11/5/2011 12/2/2011
2011 Dec 4 12/3/2011 12/31/2011
I have to translate due dates, order dates, etc into the Fiscal months and quarters, however I am having trouble writing an efficient function that will determine what Year, Month and Quarter a date is in.
Table Name = EOM
Year Month Quarter StartDate EndDate
2011 Jan 1 1/1/2011 2/4/2011
2011 Feb 1 2/5/2011 3/4/2011
2011 Mar 1 3/5/2011 4/1/2011
2011 Apr 2 4/2/2011 5/6/2011
2011 May 2 5/7/2011 6/3/2011
2011 Jun 2 6/4/2011 7/1/2011
2011 Jul 3 7/2/2011 8/5/2011
2011 Aug 3 8/6/2011 9/2/2011
2011 Sep 3 9/3/2011 9/30/2011
2011 Oct 4 10/1/2011 11/4/2011
2011 Nov 4 11/5/2011 12/2/2011
2011 Dec 4 12/3/2011 12/31/2011
I have to translate due dates, order dates, etc into the Fiscal months and quarters, however I am having trouble writing an efficient function that will determine what Year, Month and Quarter a date is in.