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?

Great! You are welcome.

You can try this other trick:

'1/1/1970' + UTCSecondsOfTimeBasically, you can add the number of UTCSeconds to 1/1/1970. The OSIsoft time math parsing will allow you to add the number of seconds to 1/1/1970 to obtain a time! In fact, a quick test will show that '*' + 1 returns one second into the future. Nice question!

Regards,

Dan