I am creating a PE tag as a timestamp. The formate is 't-1 month' but the result just minus 1 minute from today's midnight time. Anyone have some idea what is the problem because format t - 1 month is working fine in Datalink
It looks like we're running into work item 134955:
134955 - Month abbreviation (Mo) in performance equation should result in an error
Despite not working in performance equations, this abbreviation does seem to work for other clients like PI DataLink, as you said, and in the PI Analysis Service:
Try 't-1mo' - does this work for you?
See here for the valid PI Time abbreviations and formats.
Thanks for your reply but I have checked this one too but did not work.
How very interesting - and I can replicate that same behaviour in PI Data Archive 2016. Other PE functions that take a timestamp parameter (such as PrevEvent, BOM, etc) also fail to properly interpret this timestamp. The command line utility pipetest shows the same result, so it's not an SMT plugin issue. I don't have an older version of PI handy to test this on. Out of curiosity, what PI server version are you running?
Can't say I can recall coming across anything that indicates this is an invalid timestamp for the PE parser, nor can I seem to find any mention of a known issue. Possibly a bug in the PE subsystem parsing engine? Anyone from OSIsoft care to comment?
I am using PI Server 2012 (3.4.390.16).
This works but the month won't be true (30 or 31 days for month)
Retrieving data ...