AnsweredAssumed Answered

AF - Possible to convert timestamp to Unix time and vice versa?

Question asked by Jcluff on Jan 17, 2017
Latest reply on Jan 17, 2017 by Jcluff

Hello Everyone,

We are currently populating a pi point with timestamps for when our data is being ingested into the PI Archive. We do this because we have frequent out of order data and want to know when we are backfilling and when we are not. That being said, I would like to use some of AF's Archive Value Statistics functions to help me with our logic in the analysis. Problem being is that PI AF is not capable of utilizing the Archive Value Statistics functions with timestamps type. If I could convert to Unix Time, which is just the number seconds since 1/1/1970, then I could perform the functions I need within AF. I've used a fair amount of simple math to get it into the Unix time from the timestamp but I have not thought of a way to go the opposite direction without using even more complicated logic.


So, long story short, is there a way to convert a timestamp into Unix time and then convert Unix time into a timestamp within the AF?