Returns the UTC date and time of the second that is the number of working seconds specified earlier than or later than the specified date and time. The application uses the HOP schedule to define the working seconds. See Setting Up Hours of Operation.
If the value of the durationInSeconds parameter is negative, the function returns a DateTime value that is the number of working seconds specified before the value of the hopStartDateTime parameter.
AddWorkingSeconds(hopIdOrName, durationInSeconds, hopStartDateTime)
For a description of the business object categories, see Notes on "Enabled For".
|Business Object Category||Yes/No|
|Business Rules: Before-Save Rules||Yes|
|Business Rules: Calculation Rules (After Save, with or without Also Recalculate on Load)||Yes|
|Business Rules: Calculation Rules (Before Save or Always, without Also Recalculate On Load)||Yes|
|Business Rules: Calculation Rules (Before Save or Always, with Recalculate On Load)||Yes|
|Business Rules: Editing Rules||Yes1|
|Business Rules: Initialization Rules||Yes|
|Business Rules: Read Only Rules||No|
|Business Rules: Required Rules||Yes1|
|Business Rules: Validation Rules||Yes|
|Quick Actions (except UI Quick Actions)||Yes|
|UI Quick Actions||No|
|Search/Dashboard without field references||Yes|
|Search/Dashboard with field references||No|
|1. Except when this field appears on a form or is triggered by such a field.|
The hours of operation schedule name (for example, 24x7 or 9 to 5) that determines the working and non-working schedule.
|durationInSeconds||(Optional) The number of seconds before or after for which to calculate the working seconds. If you do not enter a value for this parameter, it defaults to 0, which means that it returns the same date and time that you entered.|
(Optional) The base date and time for the function. If not specified, uses the default date which is the current date and time.
DateTime value in UTC time.
If the application has to display the return value, it implicitly converts it to text, thereby allowing the display format to change depending on your culture code. See Available Languages and Cultures for a list of the culture codes used by Service Manager.
$(AddWorkingSeconds("24 x 7", 4))
If today is April 10, 2014 at 07:30:32 AM, this function returns the DateTime value for the time that is 4 working seconds past April 10, 2014 at 07:30:32 AM. In this case, it returns April 10, 2014 at 07:30:36 AM, assuming that there are no exceptions defined during that time in the HOP schedule.