Is there anything I’m overlooking in Pan X that would help me convert a UNIX date to a typical date and time format?
So far I’ve had little success in adding the UNIX date (seconds) to 1/1/1970 then converting it to a date pattern. My results have been all over the place.
I had to subtract 25180 from the unixDate to come out with the correct value.
let unixDate=val(shellscript("date +%s"))
let unixConstant= superdate(date("January 1,1970"),time("12:00 AM"))-25180
message superdatestr(unixConstant+unixDate)
Thanks guys. I was beating around the right bush but not quite getting there. - especially in trying to convert 1/1/1970 to the correct seconds. Now I can retrieve a time stamp and even convert it to the desired time zone.
I came across the need to convert to Panorama supertime to Unix time:
Convert Panorama supertime to Unix time: add 2082844800, which is the number of seconds between 1/1/1970 and 1/1/1904. They only differ by the year that they count from.
You also have to convert your local time to UTC. Panorama has a function for that, and functions for extracting dates.