New Year Calculations stops working -
01-09-2006
, 03:17 PM
STARTING DATE:
Mod( WeekofYear(Status( CurrentDate)), 2) * 7 + Status( CurrentDate)-
DayofWeek( Status( CurrentDate) - 1) - 7
ENDING DATE:
Mod( WeekofYear(Status( CurrentDate)), 2) * 7 + Status( CurrentDate)-
DayofWeek( Status( CurrentDate)) + 7
I have been using this calc to insert two dates that represent the
starting date, sunday, and ending date, saturday, of a pay period. As
long as I create these dates before the next new pay period things work
great. Even if I go into the next pay period I can change the
clock/calendar backward to the previous pay period and force it to
create the dates needed. The last pay period ended 1/07/2006,
12/25/2005 to 01/07/2006, so I created a new time sheet today,
01/09/2006, expecting the starting date to be 01/08/2006, sunday, and
the ending date to be 01/21/2006, saturday. Not so. It created
01/01/2006 to 01/14/2006. If I cahnge the calendar to the next pay
period the dates reflect, 01/15/2006 to 01/28/2006. Right two week
span, but wrong dates. How do I revise the calc to reflect the proper
year dates? By the way, the program was transfered from a desktop to a
laptop, if that makes any difference. thanks. |