I have these fields:
They calculate the number of weeks elapsed in a quarter, whose start date is set by the user in the field QTRStartDate.
They have been functioning properly during our fiscal Q1, which ended on 12/29/12; but with the new quarter being placed last year, on Sunday Dec. 30 2012, z_WeeksElapsed = (-52) and z_WeeksRemaining = 65.
Here are the calculations:
isToday = Get ( CurrentDate ) ;
dayNumEndFiscalQ = DayOfYear ( Date ( Month ( Resources::QTRStartDate ) + 3 ; 0 ; Year ( Resources::QTRStartDate )));
dayNumStart = DayOfYear (Resources::QTRStartDate);
dayNumToday = DayOfYear (isToday);
daysInFiscalQ = dayNumEndFiscalQ - dayNumStart + 1;
daysElapsed = dayNumToday - dayNumStart;
weeksElapsed = Int (daysElapsed/7)
Can anyone recommend a fix?