Page History
Page properties | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||
|
Page properties | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
|
UI Text Box | ||||||
---|---|---|---|---|---|---|
| ||||||
This functions subtracts two timestamps (the second date will be substracted from the first date) ignoring the weekends. This way you can easily calculate the elapsed working time since weekends will be ignoredReturns a
|
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
subtractDatesSkippingWeekends(number minuend_datefirstDate, number subtrahend_datedateToSubstract, timeZone time_zone) #Output: Number |
UI Expand | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
|
UI Expand | |||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||||||||||||||||||
Parameters used in this function
|
ui-expand | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
The function returns a
| Learn more about timezones | ||||||||||
Excerpt Include | Dates, times and time zones | Dates, times and time zones | nopanel | true
UI Text Box | ||
---|---|---|
| ||
Work days might depend on the time zone - it might be Sunday on the west coast of the US while at the same time it's already Monday in Australia. |
ui-expand | ||||||
---|---|---|---|---|---|---|
| ||||||
The function returns a
| ||||||
ui-text-box | ||||||
| ||||||
Similar to Variantof the previous function, but with a custom defined weekend.Arguments beginning_of_weekend and end_of_weekend take values This function is useful when the non-working days differ from the standard (Saturday/Sunday). |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
subtractDatesSkippingWeekends(number minuend_datefirstDate, number subtrahend_datedateToSubtract, timeZone time_zone, number beginning_of_weekendstartOfWeekend, number end_of_weekendendOfWeekend) #Output: number |
UI Expand | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||||||||||||||
|
UI Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters used in this function
|
UI Expand | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
The function returns a
| data type | Parameter description
|
UI Text Box | ||
---|---|---|
| ||
Work days might depend on the time zone - it might be Sunday on the west coast of the US while at the same time it's already Monday in Australia. | ||
UI Expand | ||
| ||
The output can be written into any number field. Another very common use case is to use this function in a JWT calculated date-time fields. If you don't want to work with milliseconds check out all available time macros. If you want to simply add days to a timestamp you might want to have a look at the function addDaysSkippingWeekends(). Not sure what this function returns? Simply test your expression on the expression parser test page.The function returns a | ||
subtle | true | title | number