TotalOverTime
This function returns the total of all values whose timestamps are greater than the newest timestamp minus the specified interval.
Syntax
TotalOverTime ( number, valueTimestamp, interval)
Remarks
The number parameter specifies the data value for which the total is calculated. The valueTimestamp is the timestamp for this data value. (The Timestamp function can be used to obtain this timestamp.) The interval parameter is the time interval, in nanoseconds, over which the total is calculated. The predefined time constants can be used to easily input the number of nanoseconds in a microsecond (nsecPerUSec), millisecond (nsecPerMSec), second (nsecPerSec), minute (nsecPerMin), hour (nsecPerHour), day (nsecPerDay), or week (nsecPerWeek). Any value that evaluates to –INF, INF, or NAN will be ignored. If there are no valid values stored, this function will return NAN.
Example
The following example will return the total of the variable Rain over the past 24 hours.