We are having a start date Eg. "2022-04-22 18:10:03"(Datatype: Date & Time) . I need to add 5 hours to the date and should provide me result as "2022-04-25 14:10:03".
Requirement: Should not include time between 19:01(7:01 pm) to 9:59(am) and week end (Saturday & Sunday).
Explanation: 4th April is Friday and the time given was 18:10(6:10pm). Total time taken is 50 min to complete 7pm on 4th April. As 23rd and 24th comes under week ends (Saturday & Sunday) we need to remove those date and time. Then we need to add date from 25th10:00am resulting in adding 4 hours 50 min on 25th.
Discussion posts and replies are publicly visible
now()+intervalds(5,0,0)
And to only add working hours
caladdhours(now(),5)
Thank you Harshit. This code works well with the calendar working hours that is existing with Appian. Is there any way we can change the working time/dates for that particular year and hence forth. The version we are using is 21.1.
Unfortunately, you have to create a new calendar and use it when you calculate the working days or hours in your functions.
Here are the links on how to set up a new calendar and what are the available functions for your version:
https://docs.appian.com/suite/help/21.1/Process_Calendar_Settings.html
https://docs.appian.com/suite/help/21.1/Appian_Functions.html