DpM function

Date and Time Calculations category - Date Increment family Home 
What the name means"Date Plus Months"
SyntaxDpM ( TheDate, Months, [DayCount], [Periods] )
DescriptionIncrements TheDate by the number of months specified in Months.
See AlsoDpY (TheDate, Yrs, [DayCount], [Periods])
See also Excel functionsEDATE (Related)
VariableType or ValueDescription
Inputs: (4)
1 TheDate Date A date.
2 Months Float A number of months.
3 DayCount Float (Optional) Either a single number denoting the DayCount method, or a number in the form ww.ss where ww is the daycount of whole periods and ss applies to stub periods. See Using Daycount. (Optional)
4 Periods Annual Sequence (Optional) Either an option number, or a range of floats, describing the accruals periods or the timing of cash payments, in the format mm.dd for payments in advance or -mm.dd for payments in arrears. See Using Daycount (Optional)
Output:
Return Value DateResult Date The result of the function expressed as a date.
Defaults and Values

The variable(s) of this function have certain defaults and/or switch values associated with them. Click here to see more.

Features

This function has a few features that help explain its name. Click here to see more.

Whats good or unique about it
  • Although this gives exactly the same results as Excel's EDATE function for integer months and with DayCount omitted, this function also copes with fractional month values.
  • The function also copes with differing DayCount conventions.
Key Points
If TheDate is the last day in the month, then an integer number of months will always increment to the last day in the calculated month i.e. 28/2/2003 incremented 1 month will give 31/3/2003, not 28/3/2003. However, 28/2/2004 incremented 1 month will give 28/3/2004. The reason for this is that the program does a simple check to see if you are incrementing from the last day of a particular month, and will then increment to the last day of the resulting month.
Examples
  • Preview of the DpM example.
  • The above spreadsheet can be accessed from the Quick Reference (on the Business Functions menu), on the Examples menu, or in the Business Functions\Component Examples directory
Published Edition Changes in Behaviour

This function has experienced some changes in its behaviour over its history. Click here to see more.