TimeStamp
- Last UpdatedOct 23, 2024
- 1 minute read
- PI System
- PI Server 2018
- PI Server
Return the time stamp for a single time-stamped value or an array of time-stamped values.
Syntax
TimeStamp(x)
Arguments
-
x
A time-stamped value or an array of time-stamped values
Returns
The timestamp of the specified time-stamped value
Exceptions
If the value of x is , then is returned
Example
-
TimeStamp(PrevVal('sinusoid', '*'))
[Return the time stamp of the last recorded value before the current one for 'sinusoid']
-
TimeStamp(Variable1)
Name
Expression
Value at Evaluation
Variable1
RecordedValues('att1', '*-10m', '*')
[1, 3, 5]
Variable2
TimeStamp(Variable1)
[1/3/2018 8:15:00 AM, 1/3/2018 8:16:17 AM, 1/3/2018 8:20:00 AM]
[Assuming current time is 8:23 AM on 1/3/2018, returns the timestamps of 3 recorded values in the past 10 minutes]