TimeSelector.TimeDuration property
- Last UpdatedSep 20, 2024
- 1 minute read
The TimeSelector.TimeDuration property is a read-write integer property that gets or sets the time duration. The start time of the Alarm control (TimeSelector.StartDate) is calculated as the end time (TimeSelector.EndDate) minus the new time duration.
The TimeSelector.TimeDuration can have one of the following values:
|
Value |
Description |
|---|---|
|
0 |
Custom |
|
1 |
The last minute. |
|
2 |
The last five minutes. |
|
3 |
The last ten minutes. |
|
4 |
The last 15 minutes. |
|
5 |
The last 30 minutes. |
|
6 |
The last hour. |
|
7 |
The last two hours. |
|
8 |
The last four hours. |
|
9 |
The last eight hours. |
|
10 |
The last 12 hours. |
|
11 |
The last 24 hours. |
|
12 |
The last two days. |
|
13 |
The last week. |
|
14 |
The last two weeks. |
|
15 |
The last month. |
|
16 |
The last three months. |
|
17 |
One minute. |
|
18 |
Five minutes. |
|
19 |
Ten minutes. |
|
20 |
15 minutes. |
|
21 |
30 minutes. |
|
22 |
One hour. |
|
23 |
Two hours. |
|
24 |
Four hours. |
|
25 |
Eight hours. |
|
26 |
12 hours. |
|
27 |
24 hours. |
|
28 |
Two days. |
|
29 |
One week. |
|
30 |
Two weeks. |
|
31 |
One month. |
|
32 |
Three months. |
|
33 |
Yesterday: 0:00:00 of the previous day to 0:00:00 of the current day. |
|
34 |
Current day: 0:00:00 of the current day to the current time. |
|
35 |
Previous hour: The start of the previous hour to the start of the current hour. |
|
36 |
Current hour: The start of the current hour to the current time. |
The default value is 6 (Last Hour).
Syntax
result = AlarmClient.TimeSelector.TimeDuration;
AlarmClient.TimeSelector.TimeDuration = Value;
Example
AlarmClient1.TimeSelector.TimeDuration = 5;
// The Alarm Control now retrieves alarms from the last 30 minutes.
Remarks
For more information, see Show historical alarms and/or events.