Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello.
How would I generate automatically in the load script a table that contains all of the start dates for each month of the current financial year, assuming April 2010 to March 2011. The data arrives on a monthly basis (at the end of each month) so, for instance, the data for June would be processed at the start of July. Thus when the data is processed in April (theoretically the start of a new financial year) it would actually be reflecting the last month of the old financial year, so the update of the months should reflect a one month offset to allow for this.
The table I would like to automatically generate....
01/04/2010
01/05/2010
01/06/2010
01/07/2010
01/08/2010
01/09/2010
01/10/2010
01/11/2010
01/12/2010
01/01/2011
01/02/2011
01/03/2011
The table I would like generated in May 2011 reflecting the next financial year (April 2011 - March 2012)
01/04/2011
01/05/2011
01/06/2011
01/07/2011 etc
It should be generated in May 2011 rather than April 2011 to relfect that fact the data processed at the start of any month reflects the position for the previous month. Any help will be greatly appreciated.
Many thanks Neil
Maybe this?
MyNewDateTable:
LOAD date(addmonths(yearstart(addmonths(today(),-1),0,4),recno()-1)) as MyNewDate
AUTOGENERATE 12;
Maybe this?
MyNewDateTable:
LOAD date(addmonths(yearstart(addmonths(today(),-1),0,4),recno()-1)) as MyNewDate
AUTOGENERATE 12;
John.
Many thanks as this is spot on. I really appreciate your help.
Best Regards Neil