75959 - no subject - I have two pvs called startDateTime and

I have two pvs called startDateTime and endDateTime. I am interested in getting duration by subtracting startDateTime from endDateTime. But at the same time I also want to account for weekend hours. Like if start time is say Aug 2nd(Friday) 3 PM and end time is Aug 5th(Monday) 11 AM, and my regular working hours are Monday 8 AM - to Friday 5 PM, the result should be 5 Hrs only. Is there any function available to achieve such thing.
Thanks....

OriginalPostID-75959

  Discussion posts and replies are publicly visible

Parents
  • Hello, The answer to your question can be answered in 2 parts, 1. One would need to set the working hours (in your case 9 hours) in the System calendar by going through the following link
    forum.appian.com/.../System_Calendar_Settings
    (Please note if you have to set the time for all each of the days through out the calendar you need to click/select the S-M-T-W-T-F-S to set it, it will be set for the whole calendar and not just the month where you are making the change)

    2. Once the above change is done you can use the following expression
    calworkhours(start_datetime,end_datetime)

    Hope this helps!
Reply
  • Hello, The answer to your question can be answered in 2 parts, 1. One would need to set the working hours (in your case 9 hours) in the System calendar by going through the following link
    forum.appian.com/.../System_Calendar_Settings
    (Please note if you have to set the time for all each of the days through out the calendar you need to click/select the S-M-T-W-T-F-S to set it, it will be set for the whole calendar and not just the month where you are making the change)

    2. Once the above change is done you can use the following expression
    calworkhours(start_datetime,end_datetime)

    Hope this helps!
Children
No Data