Question about date formatting in Perspective exports

Hello Team,
I hope can get some help here ...

This is what i get on the date/time column when i export from a perspective tag history chart to CSV.

time
1.72817E+12
1.72817E+12
1.72817E+12
1.7282E+12
1.7282E+12
1.7282E+12
1.72821E+12
1.72821E+12
1.72821E+12

How do i ensure the date and time is formatted correctly.

Thank you in advance.

Hello Team,
I hope can get some help here ...

This is what i get on the date/time column when i export from a perspective tag history chart to CSV.

time
1.72817E+12
1.72817E+12
1.72817E+12
1.7282E+12
1.7282E+12
1.7282E+12
1.72821E+12
1.72821E+12
1.72821E+12

How do i ensure the date and time is formatted correctly.

Thank you in advance.

How are you generating the CSV?

Tag history time stamps are in milliseconds from epoch.

In theory, if you weren't concerned with potentially loosing data, then you would probably use,
system.date.format() to provide a formatted date string, but it would really depend upon how you are generating your CSV.

1 Like

Those are Ignition's timestamp values which are in milliseconds since 1970-01-01 00:00:00.0 (the UNIX epoch). Ignition has several functions to work with date and time. See system.date.format | Ignition User Manual, for example.

1 Like

I've done some surgery to tie all the myriad posts on this into this one topic. As @lrose stated, please don't double post your questions.

2 Likes

Ifeanyi, please do not cross-post. It wastes people's time, causes duplication of effort and is against the forum rules. See FAQ - Inductive Automation Forum.

I'll also for posterity mention:

Understood

Thank you

Thank you @PGriffith