Page History
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 ignored. |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
subtractDatesSkippingWeekends(firstDate, dateToSubstract, timeZone) #Output: Number |
UI Expand | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||
|
UI Expand | ||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||
Parameters used in this function
|
UI Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
This function returns a
|
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 Text Box | ||||
---|---|---|---|---|
| ||||
Variant of the function where you can additionally define the start and the end of the weekend. This function is useful when the non-working days differ from the standard (Saturday/Sunday). |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
subtractDatesSkippingWeekends(firstDate, dateToSubtract, timeZone, startOfWeekend, endOfWeekend) #Output: number |
UI Expand | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||
|
UI Expand | ||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||
Parameters used in this function
|
UI Expand | ||||||
---|---|---|---|---|---|---|
| ||||||
This function returns a
|
UI Text Box | ||
---|---|---|
| ||
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. |
Use cases and examples
Page properties report | ||||||
---|---|---|---|---|---|---|
|
Page properties | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||
|
Page properties | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||||||||||||||||||||
|
Page properties | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ||||||||||||||||||||||
|