You can use time and date functions to enable time-related calculations, such as to retrieve data from different times periods.

When two line items have a different time scale, and a formula uses both, values aggregate into the greater timescale. For example, days aggregate into months and months into quarters. You can choose to skip levels. For example, you can aggregate days into quarters. Learn more in Time aggregation.

The following functions are called time series functions: CUMULATE, DECUMULATE, LAG, LEAD, MOVINGSUM, OFFSET, POST, PREVIOUS, and PROFILE. If you use line items as arguments for these functions, the source and target line items must use the same time range.

TitleDescription
ADDMONTHSThe ADDMONTHS function adds a number of months to a date.
ADDYEARSThe ADDYEARS function adds a number of years to a date.
CUMULATEThe function CUMULATE adds values and returns a number. By default, the values are added across a time period. You can also choose to add values across a list.
CURRENTPERIODENDThe CURRENTPERIODEND function returns the end date from a model's current period.
CURRENTPERIODSTARTThe CURRENTPERIODSTART function returns the start date from a model's current period.
DATEThe DATE function forms a date from values that represent the year, month, and day. 
DAYThe DAY function returns the day from a date as a number between 1 and 31. If the day is blank, it returns 0.
DAYSThe DAYS function returns the number of days in a given time period.
DAYSINMONTHThe DAYSINMONTH function returns the number of days in a month you specify.
DAYSINYEARThe DAYSINYEAR function returns the number of days in a year you specify.
DECUMULATEThe DECUMULATE function calculates the difference between the values of the current and previous periods.
ENDThe END function returns the last date of a time period.
HALFYEARTODATEThe HALFYEARTODATE function cumulates values from a single numeric parameter, over a half-year period. The HALFYEARTODATE cumulation starts at the Fiscal Year Start Month as selected in the Model Calendar, and resets every half-year.
HALFYEARVALUEThe HALFYEARVALUE function references another line item and returns the half-yearly time summary in place of the detail value.
INPERIODThe INPERIOD function returns a TRUE result for a date that falls under a time period or a module's Time dimension. It returns FALSE for all other dates.
LAGLAG returns a value from a period in the past. 
LEADLEAD returns a value from a period in the future. 
MONTHThe function MONTH converts a date or time period to a month in number format.
MONTHTODATEMONTHTODATE cumulates values from a single numeric parameter, within a monthly time range.
MONTHVALUEThe MONTHVALUE function references another line item and returns the monthly time summary in place of the detail value.
MOVINGSUMMOVINGSUM returns values over a changing time range. For each time range included, it aggregates the sum of values found.
NEXTThe NEXT function returns the value from the next period in the Time dimension.
OFFSETOFFSET returns a value from a period before or after the current period. 
PERIODThe PERIOD function converts a date to a time period. 
POSTThe POST function pushes a value a set number of periods into the future.
PREVIOUSThe PREVIOUS function returns the value from the previous period in the Time dimension.
PROFILEThe PROFILE function multiplies values over time based on a series of numbers, or profile. The profile does not require a time dimension.
QUARTERTODATEQUARTERTODATE accumulates values from a single numeric parameter, within a quarterly time range.
QUARTERVALUEThe QUARTERVALUE function references another line item and returns the quarterly time summary in place of the detail value.
SPREADThe SPREAD function divides a value evenly over a number of time periods. 
STARTThe START function returns the first date of a time period. 
TIMESUMAggregates values between two time periods.
WEEKDAYThe WEEKDAY function converts a date to a number between one and seven, representing the day of the week.
WEEKTODATEWEEKTODATE aggregates the daily values within a week from a single numeric parameter. WEEKTODATE resets after the last day of the week.
WEEKVALUEThe WEEKVALUE function references another line item and returns the weekly time summary in place of the detail value.
YEARThe function YEAR converts a date or time period to a year in number format.
YEARTODATEYEARTODATE cumulates values from a single numeric parameter, within a yearly time range. YEARTODATE resets at each yearly start date, based on Calendar Type.
YEARVALUEThe YEARVALUE function references another line item and returns the yearly time summary in place of the detail value.