Introduction: The Date Increment Family deals with adding or deducting periods of time to a date, or incrementing a date according to an annual sequence of dates. The functions here are often used for a whole row or column of a spreadsheet, to create a list of dates, or timebase, for a model. The functions can be grouped as follows:
- Basic date incrementing is done by DpY and DpM, and these are very popular functions. These can frequently used without worrying about the two optional arguments DayCount and Periods, but you can use the full panoply of daycount options should you wish to specify more exactly how you want the date incremented, see Using Daycount.
- EDateBF is the equivalent of Excel"s EDATE function, with the difference that it can take a fractional, not just whole, number of months.
- Incrementing a date from a date sequence is done by NextDateSeq and PrevDateSeq. These functions find the next previous date by reference to an annual date sequence (for example {6.15,12.15} for 15th July, 15th December) (see Annual Date Sequences for more details). Note that you can also use a BusDaySwitch as part of the annual date sequence if you want to use a particular business day convention to ensure your date does not fall on a holiday.
- The DateSeq array function takes the use of date sequences to generate a list of ascending dates a step further, calculating them in a single Array Function.
- Finally NextDateCombine function and the DateSeqCombine array function use the ...Combine feature to allow the use of several date sequences, which the function will "merge" internally and create the next date in the sequence by taking the earliest of these.
|