AnsweredAssumed Answered

Custom symbol PITime parser

Question asked by MDJ on Oct 8, 2018
Latest reply on Oct 25, 2018 by Eugene Lee

Hi All

(PIVision Custom Symbols for PiVision2017 R2)

Is there a way to reuse build in PITIme parser to parse/validate inserted time in my own javascript - Custom Symbol? Same time parser/validator that is used to parse start/end time of TimeBar?

Create own regex to fully match the PiVision time parser is waste of time, and is not correct approach to do that, handle any kind of options that Osisoft intruduced/is introducing/will introduce, should be reusable - keep same behaving in whole PIVision.

i.e. correctly parse to Time (Dae and Time) 3jan4-1d+2h+34m -> 1/2/2004 2:34:00 AM., 3jan4-y -> is today at 12:00:00 AM, but 3jan4-y-1h is 1/2/2004 11:00:00 PM