I need help with a Business Day formula. I am trying to figure out how to write a formula that would tell me when a due date would be in which the due date would only fall between a Monday and a Friday. I have a formula that calculates the days old based on Business Days old:
Local DateTimeVar d1 := {LOAN.DISBURSAL_DATE};
Local DateTimeVar d2 :={LOAN_USER.CLOSING_PACKAGE} ;
DateDiff ("d", d1, d2) - DateDiff ("ww", d1, d2, crSaturday) - DateDiff ("ww", d1, d2, crSunday)-2 -{@total}
This formula tells me how many business days it is from the due date. I want to have a formula that tells me what the due date is. This formula produces a number. If this number were 2 and I wasnt worried about business days i could do currentdate - {@networkdaysold} (formula above) but if this result were to fall on a Saturday or Sunday it would be wrong. How do I combat this?
Thanks.
Local DateTimeVar d1 := {LOAN.DISBURSAL_DATE};
Local DateTimeVar d2 :={LOAN_USER.CLOSING_PACKAGE} ;
DateDiff ("d", d1, d2) - DateDiff ("ww", d1, d2, crSaturday) - DateDiff ("ww", d1, d2, crSunday)-2 -{@total}
This formula tells me how many business days it is from the due date. I want to have a formula that tells me what the due date is. This formula produces a number. If this number were 2 and I wasnt worried about business days i could do currentdate - {@networkdaysold} (formula above) but if this result were to fall on a Saturday or Sunday it would be wrong. How do I combat this?
Thanks.