Time inputs
- Last UpdatedNov 21, 2022
- 2 minute read
- PI System
- PI DataLink 2023 SP1
- Visualization
Many PI DataLink functions require Start time and End time inputs to retrieve an array of values over a specific time period. Other PI DataLink functions require a Time stamp input to retrieve values at a specific time. Follow these guidelines when specifying time inputs:
-
Enter a valid PI time expression. Expressions can include fixed times, reference-time abbreviations, and time offsets. Use fixed times, such as 10-Dec-16 19:12 to always retrieve data from a certain date, and use reference-time abbreviations and time offsets, such as t and -3h, to retrieve data relative to the current time.
-
A time offset entered alone in an End time input specifies a time relative to the Start time input.
-
A time offset entered alone in a Start time or Time stamp input specifies a time relative to the current time.
-
If the start time is more recent than the end time, PI DataLink displays results in reverse chronological order.
-
Precede time expressions entered in worksheet cells with a single quote to indicate a string (for example, '10-Dec-99 19:12 or '-3h).
-
Cell references may also use the absolute Excel time format (such as 39299.6146, equivalent to 8/5/2007 2:45:00 PM). Excel stores time stamps in this format, which represents the cumulative number of days since 1900. Excel can display the same time stamps using any date-time format assigned to the cell.
-
Some time entries, such as 9:45, can represent both a valid time and a valid range of worksheet rows. In a task pane field, precede such entries with a single quote, such as '9:45, to force PI DataLink to interpret as a time.
Some PI DataLink functions require a Time interval input, which you specify with a single value:
-
Enter a value and time unit, such as a 1d or 30m; never include a reference time. For example, to specify an interval of 32 minutes, enter 32m or reference a cell containing that string.
-
To enter intervals in terms of frequency, convert the frequency to equivalent seconds. For example, enter a frequency of 25 Hz as a 0.04s interval (=1/25 of a second).
Note: PI DataLink supports only the default 1900 date system supported by Excel. PI DataLink does not support Excel's 1904 date system, and returns incorrect time stamps if this system is used.