SetPeriod(StartDate: Variant; EndDate: Variant): IMsPeriod;
StartDate. Period start date.
EndDate. Period end date.
The SetPeriod method generates period by specified dates.
For the method correct work, period start date should be less than period end date.
The method can be used to set up calculation period in arithmetic methods where data array is the input parameter. To set calculation period, determine SetPeriod in any array place, for example:
Average({Albania|BCA[t]}, SetPeriod("2000","2010"))
The mean value of the {Albania|BCA[t]} series will be found for the period from 2000 to 2010.
The date can be specified in one of the following formats:
Format | Description |
"01.01.2000" | It specifies the certain date in the year. |
2000 or "2000A" | The date is the beginning of the year. |
"2000S1" | The date is the beginning of the specified half-year. |
"2000-H1" | The date is the date corresponding to 9 months of the year. |
"2000Q1" | The date is the beginning of the specified quarter. |
"2000M1" | The date is the beginning of the specified month. |
"2000-W1" | The date is the beginning of the specified week. |
Methods, in which SetPeriod can be used
The property use is given in the example for IModelling.MovAvg.
See also: