WeekofFiscalYear ( TheDate ; StartingDay ; StartMonth ; StartDay )
A generalization of FMP's WeekofYearFiscal( TheDate ; StartingDay ) in that this function allows the user to specify the starting month and day for the Fiscal Year (not the usual Jan 1st).
Average rating: 4.4 (32 votes) Log in to vote
Jason L. DeLooze Nocturnal MicroSystems http://n/a |
Function definition: (Copy & paste into FileMaker's Edit Custom Function window)
A generalization of FMP's WeekofYearFiscal( TheDate ; StartingDay ) in that this function allows the user to specify the starting month and day for the Fiscal Year (not the usual Jan 1st).
Parameters:
TheDate: any valid date;
StartingDay: a number from 1 to 7, representing the first day of the week (1 -> Sun, 2 -> Mon, ..., 7 -> Sat).
StartMonth: a number from 1 to 12, representing the month marking the start of the Fiscal Year.
StartDay: a day number in StartMonth from 1 to last day of StartMonth, representing the day in StartMonth marking the start of the Fiscal Year.
Output: a number from 1 to 53 representing the week of the Fiscal Year in which TheDate falls.
Comments
Katy Butterworth, New Zealand Apr 12, 2011 |
||
I just wanted to say "thank you", this saved me a huge amount of time. I have been trying to get the week numbers for dates we export to another system where they start their week numbereing on the last Monday of December! Thank you for sharing. |
||
Phil, Poole, UK Jun 16, 2014 |
||
I've tried to do this my self numerous times, but never managed to get it quite right. Saved me a lot of hassle, Thanks very much! |
||
Greg Apr 5, 2016 |
||
Like Katy and Phil, Ive been trying to get this to work for ages. Thank you! :-D | ||
Note: these functions are not guaranteed or supported by BrianDunning.com. Please contact the individual developer with any questions or problems.