Specifying cycle count with two equity operators
- Last UpdatedMar 19, 2025
- 1 minute read
If the time range is specified using >= and <=, then the first row falls exactly on the start time, and the last row falls exactly on the end time. In this case, the resolution used is (end date – start date) / (cyclecount – 1).
This query uses a cycle count of 60, resulting in a 1 second resolution for the data. The query uses the remote table view.
SELECT DateTime, Value
FROM History
WHERE TagName = 'SysTimeSec'
AND DateTime >= '2001-01-13 12:00:00'
AND DateTime <= '2001-01-13 12:00:59'
AND wwCycleCount = 60
AND wwRetrievalMode = 'Cyclic'
The results are:
|
DateTime |
Value |
|
2001-01-13 12:00:00.000 |
0 |
|
2001-01-13 12:00:01.000 |
1 |
|
2001-01-13 12:00:02.000 |
2 |
|
2001-01-13 12:00:03.000 |
3 |
|
2001-01-13 12:00:04.000 |
4 |
|
... |
|
|
2001-01-13 12:00:56.000 |
56 |
|
2001-01-13 12:00:57.000 |
57 |
|
2001-01-13 12:00:58.000 |
58 |
|
2001-01-13 12:00:59.000 |
59 |
(60 row(s) affected)