How to write expression in AF Analyses to calculate time (value from some PI point) +4h
'CalcTime' is in format 05/03/2018 11:56:06.295 I want this value +4h (05/03/2018 15:56:06.295)
Assuming CalcTime is a DateTime typed attribute, you need to start with +/- to indicate that the value is a timespan: 'CalcTime' + '+4h'
Please refer "Specify time stamp for analysis outputs-Relative to Trigger Time" in PI Server
Is what you call CalcTime the same as the trigger time? If so, you can use the PI relative time string "*+4h". Note that the asterisk does not always mean Now with relative time strings. It depends on the context. For the context of analyses, the asterisk is the trigger time, which is helpful for when you are backfilling calculations.
'* + 4h' works (I tried this before my question).
But, I thought it would be possible to sum time from PI point and some fixed values.
I'm thinking to solve the problem in another way... convert value to integer...
But, how to turn back time from Integer to DateTime.
You may try reading up on:
AF Analytics - Working with date-time arithmetic
or download and read the whole white paper
Tips and Tricks for Asset Based Analytics
that's it, works!
I did not understand mistake in syntax.
Retrieving data ...