Skip to main content

Description

Returns the number of days for each period of time.

 

Syntax

DAYSINPERIOD(Time Dimension , Start Date] , End Date] , Working Days] , Holidays])

 

Arguments

Argument Type Dimensions Description
Time Dimension

(required)

Dimension Time Dimension Must be a Time Dimension based on the Calendar settings. The available options are: Week, Month, Quarter or Year.
Start Date

(optional)

Date No Dimension or Dimensions of Time Dimension Start date to count from.
End Date

(optional)

Date No Dimension or Dimensions of Time Dimension End date to count to.

Working Days

(optional)

Boolean Day of Week Dimension from Calendar settings Defines which days of the week are working and non-working days.

Holidays

(optional)

Boolean Day Dimension from Calendar settings. Defines which dates are holidays.

 

Returns

Type Dimensions
Integer Time Dimension

 

Examples

Formula Description

DAYSINPERIOD(Month)

Returns the number of days of each month.
DAYSINPERIOD(Quarter) Returns the number of days of each quarter.
DAYSINPERIOD(Month, DATE(2020, 06, 01))

Returns the number of days of each month, starting from June 1st 2020.

DAYSINPERIOD(Month, DATE(2020, 06, 01), DATE(2020, 12, 31))

Returns the number of days of each month, starting from June 1st 2020 and ending December 31 2020.

DAYSINPERIOD(Month, 'Employee'.'Start Date', 'Employee'.'End Date')

Returns the number of days by month an employee was present between its start and end date.

DAYSINPERIOD(Month, DATE(2020, 06, 01), DATE(2020,12,31), ‘Day of Week’ IN (‘Day of Week’.”Monday”, ‘Day of Week’.”Tuesday”), Day IN (TIMEDIM(DATE(2020,12,25))) Returns the number of working days of each month, starting June 1st 2020 and ending December 31st 2020. Only Mondays and Tuesdays are working days. December 25th is a holiday.

 

See also

Related articles: PRORATA

 

More of a hands-on learner? 

Talk to your Customer Success Manager about downloading the Functions and Modifiers in Pigment Application into your workspace.  It includes examples of every formula and modifier in Pigment!