Error handling for modifyDate routine.