1. Calculation functions
  2. All Functions
  3. Time and Date Functions
  4. DAYS

The DAYS function returns the number of days in a given time period.

For example, use the DAYS function to find out how many days are in a quarter.

Syntax

DAYS([Period])

Arguments

ArgumentData typeDescription
Period (Optional)Time periodThe period for which to return the number of days.

The DAYS function returns a numeric result.

Additional information

You can omit the Period argument if the line item you use the DAYS function in is dimensioned by Time. In this case, the DAYS function returns the number of days in each time period of the Time dimension.

If you use the DAYS function in a line item that is not dimensioned by Time, you must provide the Period argument or the function returns an error.

Related Anaplan functions

Examples

Example with time dimension


Number of days in month

DAYS()

Jan 2131
Feb 2128
Mar 2131
Q1 FY2190
Apr 2130
May 2131
Jun 2130
Q2 FY2191
H1 FY21181
Jul 2131
Aug 2131
Sep 2130
Q3 FY2192
Oct 2131
Nov 2130
Dec 2131
Q4 FY2192
H2 FY21184
FY21365

In this example, the module contains both the Time dimension and a single line item. The line item contains the DAYS function without an argument, so it returns the number of days for each applicable time period of the Time dimension. As the DAYS function returns a numeric result, the Sum summary method aggregates the number of days within each parent time period.

Example without time dimension


Product A LaunchProduct B Launch
Month periodFeb 19Feb 20
Quarter periodQ1 FY19Q1 FY20
Year periodFY19FY20

Days in month

DAYS(Month period)

2829

Days in quarter

DAYS(Quarter period)

9091

Days in year

DAYS(Year period)

365366

In this example, the module does not have time as a dimension. As such, the Period argument must be given to use the DAYS function.

A list that describes two different product launches displays on columns. Line items display on rows. The top three line items are time period format. The bottom three line items are number format, and contain formulas to calculate the number of days in the corresponding time periods.