values = oTrend.GetValueByTime(sWhat,tTime,nTimeType,sStyle)
|sWhat||(String) Specification of the variable (or variables) whose stored value(s) has to be returned. It is possible to enter, for example: |
"a1;" or "a1;a2;a3;" if an array of the variables (with names a1..a3) from the Data page has to be returned or
"time;" if even the time has to be returned.
At the variables it is necessary to keep the order by the order from the page. For example, if the order of the variables from the page is a1,a2,a3,..., then it is possible to enter, for example, "a1;a3;" in the parameter but "a3;a1" is wrong.
Time setting can be changed by entering "time:winter;" and then all time values are returned in the "standard time" elsewhere they are in the "local time".
|tTime||(Date) Time whose record of variables values has to be searched.|
|nTimeType||(Long) Time type of the tTime parameter|
1 - tTime is "local time" (the "standard time" in the standard season and the "daylight-saving time" in the daylight-saving season, corresponds to the computer time according to the local settings)
2 - tTime is "standard time" (in the daylight-saving and standard seasons).
|sStyle||(String) Way of searching the time specified in the tTime parameter.|
"eq:xxx" - Record whose time mark equals the tTime time, is searched. The string xxx specifies the precision of the equality. For xxx the values Nsec, Nmin are enabled where N is a real number that sets the number of seconds, respectively number of minutes. If, for example, 15 seconds (...,14:00,14:15,14:30,...) values are stored by the PmTrend object, then after entering tTime=time 14:17, sStyle="eq:3sec", the record of variables with the time mark 14:15 will be found.
"newest" - The latest record is looked for. In the tTime, the value 0 needs to be set.
"oldest" - The oldest record is looked for. In the tTime, the value 0 needs to be set.
Dim values, tTime
values = oTrend.GetValueByTime("time;a0;a1",tTime,1,"eq:1sec")
Dim values, tTime
values = oTrend.GetValueByTime("a0;a1",tTime,1,"eq:1.5min")