Using an Asset Analysis triggered off a new event, you can detect that its in "Run" mode, grab that time, add 6 hours to that trigger time, and output to an attribute based on a PIPoint. You would have to use NoOutput() when the status isn't "Run". It may be as simple as "*+6h". Keep in mind the output attribute is a PIPoint that receives a new AFValue, where the Value property is the time representing the time due, and the Timestamp property should be the same as the trigger time.
Yes that would be what I would like to achieve.
I am trying to do this in an asset analysis as you say.
I can get the timestamp of the event. It returns value - "13/11/2017 15:07:17"
How do I add 6 hrs to this and also deal with adding into a new day?
I have tried "*+6h" with no luck.
Thanks again for your help.
Yes. Couple of quirks. For one, any operations of times and time spans always assumes the UOM is seconds. So the Convert function is quite useful. Note this may take 2 conversions. First, where you explicitly declare you are working with hours, and the last to seconds.
Click on image to enlarge in browser:
The above analysis, which I named Assign Due Date, maps to an output attribute (Due Date) that is a DateTime value. You then need another analysis to output is past due.
That worked a charm. Appreciated! The conversion steps are where I was falling down.