The description of the NextDate function is as follows:
- Calling parameters (NextStep (integer), Calendar (the Date table), PeriodType (Option, integer))
- Returns Integer
The calling syntax for the NextDate function is as follows:
IntegerVariable := NextDate(NextStep,CalendarRec,PeriodType)
NextDate will find the next date record in the Calendar table that satisfies the calling parameters. The Calendar and PeriodType calling parameters for NextDate have the same definition as they do for the FindDate function. However, for this function to be really useful, the Calendar must be initialized before calling NextDate. Otherwise, the function will calculate the appropriate next date from day 0. The NextStep parameter allows us to define the number of periods of PeriodType to move, so as to obtain the desired next date. For example, if we start with a Calendar table positioned on 01/25/16, a PeriodType of quarter (that is 3), and a NextStep of 2, the NextDate will move forward...