Free cookie consent management tool by TermsFeed caladddays() Function
caladddays() Function

Tip:  Check out the new Date and Time function a!addDateTime(). It does everything caladddays() does but offers more flexibility. You can also use the new a!subtractDateTime() function to subtract an increment of time from a specified start date.

Function

caladddays( start_datetime, number, calendar_name )

This function adds a given number of working days as designated on the process calendar to a Date and Time value, and returns a Date and Time value that falls within the work time defined in the process calendar.

Parameters

Keyword Type Description

start_datetime

Date and Time

The starting Date and Time.

number

Integer

The number of net working days to be added to the Date and Time.

calendar_name

Text

This optional parameter accepts the name of a system calendar; otherwise, the default calendar is used.

Returns

Date and Time

Usage considerations

General considerations

This function calculates results across daylight saving time boundaries.

This function is commonly used in process events, like Start Events or Timer Events.

Using the start_datetime parameter

When you pass a non-working day as the start_datetime it adds the desired number of days to the next working day defined on the calendar.

Passing a date value casts the parameter to a Date and Time with the value of 12:00 AM GMT for that date.

Using the number parameter

The number parameter is limited to one-year's worth of working days (263 days with a default working time setting in the process calendar). The maximum parameter value is 365.

Using the calendar_name parameter

Passing a calendar name allows you to calculate working days using an alternate system calendar, if you have multiple calendars configured.

See also: Process Calendar Settings

Examples

caladddays(datetime(2011,12,13,12,0,0),0) returns 12/13/2011 12:00 PM GMT +00:00

In this example, a Date and Time that falls into non-working time is adjusted to the next working time on the process calendar.

Feature compatibility

The table below lists this function's compatibility with various features in Appian.
Feature Compatibility Note
Portals Incompatible
Offline Mobile Incompatible
Sync-Time Custom Record Fields Compatible

Can be used to create a custom record field that only evaluates at sync time.

Real-Time Custom Record Fields Incompatible
Process Reports Compatible
Process Events Compatible

caladddays() Function

FEEDBACK