Skip to main content
1-Visitor
November 6, 2014
Solved

Difference between two dates by excluding Weekends

  • November 6, 2014
  • 1 reply
  • 1163 views

I need the Difference between two dates by excluding Weekends.

I used "weekdaysDiff" function its is failing when I gave First and Last date as Weekend Dates .

or when I gave any one value as Weekend.

Thanks

    Best answer by LLawton

    Years ago I had written a trigger script for MKS/PTC that did that and posted it in the "Fields Developped Objects" database. Ask PTC support to send you "calculateField.js".

    What this means, of course, is that you must use a trigger and cannot use a field computation. Are you sure it's the weekdaysDiff function that fails and not somewhere else in your formula? You may want to post it and have other eyes look at it.

    1 reply

    LLawton16-PearlAnswer
    16-Pearl
    November 6, 2014

    Years ago I had written a trigger script for MKS/PTC that did that and posted it in the "Fields Developped Objects" database. Ask PTC support to send you "calculateField.js".

    What this means, of course, is that you must use a trigger and cannot use a field computation. Are you sure it's the weekdaysDiff function that fails and not somewhere else in your formula? You may want to post it and have other eyes look at it.