Searches for the index of the data point according to specified parameters. The index value that is returned by the method, depends on the nIndexType parameter and refers either to the whole buffer of only to the visible part of the buffer.
The vTime time expected according to setting the TrendsView.TimeSetType property, i.e. "local time", "standard time" or "daylight-saving time".
n = oPoints.GetIndexByTime(vTime, nStyle, nIndexType)
|vTime||(Variant) Time whereby the data point has to be searched|
|nStyle||(Variant) Definition of the data point owing to the vTime time|
0 - the point whose time is less or equal the vTime time
1 - the point whose time is greater or equal the vTime time
2 - the point that is the closest to the vTime time
|nIndexType||(Long) Required type of the returned index|
0 - Index refers to the beginning of the buffer
1 - Index refers to the first data point that is displayed by the buffer viewer
oTView.TimeSetType = 1
nIndex = oPoints.GetIndexByTime(vTime, 0, 0) 'vTime is "local time"
oTView.TimeSetType = 2
nIndex = oPoints.GetIndexByTime(vTime, 0, 0) 'vTime is "standard time"