Weekday (Tag-based PE function)
- Last UpdatedOct 04, 2024
- 1 minute read
- PI System
- PI Server 2023
- PI Server
Extract the day of the week from a given time expression.
Note: The days of the week are represented in a range from 1-7, where 1 represents a Sunday.
Syntax
Weekday(t1)
Arguments
t1
A time expression, enclosed in single quotes
Returns
The day of the week, in the range 1-7, where 1 represents a Sunday.
Exceptions
None
Example
Weekday('*')
-
[Return what day of the week today is. ]
Weekday(FindEq('att1', '-7d', '*', 50))
-
[Return what day of the week it was when the value of 'att1' was 50 for the first time in the past 7 days. ]