PI Time PDF
PI Time PDF
LEARNING OUTCOMES
When searching for data in PI you will use a timestamp since most PI data is time series data
and this data has a timestamp associated with it. We can use a special syntax, called PI time, to
specify inputs for timestamps and time intervals in the PI client applications, for example PI
Vision. PI time uses specific abbreviations and rules in building valid time expressions.
PI Time Expressions
In PI there are two ways to specify time:
Fixed Time: An expression that signifies a specific date and time. Used when you want to
save a view of your PI System data for a specific time in history.
Example: A user is creating a report that analyses an equipment failure event which
occurred on the 25th of July 2013 at 11 am, so 25-Jul-2013 11:00:00 AM
Reference Time: An expression that signifies a date and time relative to the current date
and time. Used when you want to create a dynamic view of your data, which can be used to
view data in real-time, or re-used on a periodic basis to create periodic reports.
Example: A user creates a report that summarizes weekly production totals. By using
relative time expressions, the user will be able to re-use this report every week, so define a
start date of “Monday” meaning start the report from last Monday.
Both Fixed Time and Reference Time can be used with Time Offsets; Time Offsets can be used
alone.
Fixed Time Syntax
A fixed time expression is an expression which includes a date, and optionally a time.
When the time component is omitted, Midnight is assumed. And midnight occurs at the
beginning of the day, not the end.
Expression Meaning
5-jan-92 12:34 12:34 p.m. on January 5, 1992
25-sep-12 00:00:00 (midnight) on September 25,
2012
The PI System interprets many different formats for fixed time. In the event of an ambiguous
input, the Windows Region and Language settings of the computer where the PI Visualization
Tool is installed take precedence.
Use the first three letters as an abbreviation for any day of the week and any month of the year.
For example:
Expression Meaning
thu 00:00:00 (midnight) on the most recent Thursday
MAR 00:00:00 (midnight) on the current day in March of the
current year
Time Offset
When specifying PI time use specific abbreviations that represent time units. These are used in
constructing Time Offsets as in the table.
Specify the abbreviation, the full time unit or the plural version of the time unit, such as s,
second, or seconds. Time offset is any of the time units with a valid value and a + or – sign
included, e.g. +8h.
Time offsets can be used alone in a time field or come with a fixed time or reference-time
abbreviation.
Time Offset Syntax
Rule 3: A fixed timestamp consists of the fields of Year, Month, Day and Time (hours,
minutes and seconds). If any of these fields are not specified in the PI time expression,
the following values will be assumed by default: