AnsweredAssumed Answered

AFTime Constructor (String) issue

Question asked by John Messinger Champion on Jun 30, 2015
Latest reply on Jun 7, 2018 by rdavin

When creating a new AFTime object from a String, one can pass in a standard PI time string such as "*-8h" or "t+6.5h" etc, however it seems not all valid PI time strings are accepted by this constructor. For example, I might want to initialise a new AFTime object for 6:00am on the 1st day of the current month, and so I would ordinarily use a time string of "1 6:". This is a valid PI time string that I can use elsewhere, such as PI ProcessBook (in fact, I seem to recall that this format used to be mentioned as a valid PI time string in PI Client training courses), however it is not supported in the AFSDK. Is there a particular reason for this, and are there any other limitations on which PI time strings can be passed when using this constructor? I didn't see anything in the documentation that indicated this limitation, so I'm curious to know what else there might be.