# Question about date formatting in Perspective exports

**URL:** <https://forum.inductiveautomation.com/t/question-about-date-formatting-in-perspective-exports/97038>\
**Category:** Ignition\
**Created:** [October 9, 2024, 4:56pm UTC](https://forum.inductiveautomation.com/t/question-about-date-formatting-in-perspective-exports/97038 "2024-10-09T16:56:07Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ifeanyi\_Oriseh](https://avatars.discourse-cdn.com/v4/letter/i/b2d939/32.png) [@Ifeanyi\_Oriseh](https://forum.inductiveautomation.com/u/Ifeanyi_Oriseh)\
**Post date:** [October 9, 2024, 4:56pm UTC](https://forum.inductiveautomation.com/t/question-about-date-formatting-in-perspective-exports/97038/1 "2024-10-09T16:56:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Ifeanyi\_Oriseh](https://avatars.discourse-cdn.com/v4/letter/i/b2d939/32.png) [@Ifeanyi\_Oriseh](https://forum.inductiveautomation.com/u/Ifeanyi_Oriseh)\
**Post date:** [October 9, 2024, 4:51pm UTC](https://forum.inductiveautomation.com/t/question-about-date-formatting-in-perspective-exports/97038/2 "2024-10-09T16:51:28Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![lrose](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/lrose/32/62724_2.png) [@lrose](https://forum.inductiveautomation.com/u/lrose)\
**Post date:** [October 9, 2024, 5:03pm UTC](https://forum.inductiveautomation.com/t/question-about-date-formatting-in-perspective-exports/97038/3 "2024-10-09T17:03:57Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 9, 2024, 5:10pm UTC](https://forum.inductiveautomation.com/t/question-about-date-formatting-in-perspective-exports/97038/5 "2024-10-09T17:10:19Z")

</div>

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](https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-date/system-date-format), for example.

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 9, 2024, 5:12pm UTC](https://forum.inductiveautomation.com/t/question-about-date-formatting-in-perspective-exports/97038/6 "2024-10-09T17:12:54Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Transistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/transistor/32/3380_2.png) [@Transistor](https://forum.inductiveautomation.com/u/Transistor)\
**Post date:** [October 9, 2024, 5:13pm UTC](https://forum.inductiveautomation.com/t/question-about-date-formatting-in-perspective-exports/97038/7 "2024-10-09T17:13:24Z")

</div>

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](https://forum.inductiveautomation.com/faq#keep-tidy).

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [October 9, 2024, 5:14pm UTC](https://forum.inductiveautomation.com/t/question-about-date-formatting-in-perspective-exports/97038/8 "2024-10-09T17:14:46Z")

</div>

I'll also for posterity mention:

> **[system.dataset.formatDates | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-dataset/system-dataset-formatDates)**
>
> Returns a new dataset with Date columns as strings formatted according to the dateFormat specified.

---

<div class="post-metadata">

**Author:** ![Ifeanyi\_Oriseh](https://avatars.discourse-cdn.com/v4/letter/i/b2d939/32.png) [@Ifeanyi\_Oriseh](https://forum.inductiveautomation.com/u/Ifeanyi_Oriseh)\
**Post date:** [October 9, 2024, 5:20pm UTC](https://forum.inductiveautomation.com/t/question-about-date-formatting-in-perspective-exports/97038/9 "2024-10-09T17:20:49Z")

</div>

Understood

Thank you

---

<div class="post-metadata">

**Author:** ![Ifeanyi\_Oriseh](https://avatars.discourse-cdn.com/v4/letter/i/b2d939/32.png) [@Ifeanyi\_Oriseh](https://forum.inductiveautomation.com/u/Ifeanyi_Oriseh)\
**Post date:** [October 9, 2024, 5:51pm UTC](https://forum.inductiveautomation.com/t/question-about-date-formatting-in-perspective-exports/97038/10 "2024-10-09T17:51:12Z")

</div>

Thank you @paul-griffith

---

<div class="post-metadata">

**Author:** ![Josh\_Speer](https://avatars.discourse-cdn.com/v4/letter/j/b2d939/32.png) [@Josh\_Speer](https://forum.inductiveautomation.com/u/Josh_Speer)\
**Post date:** [November 25, 2024, 11:26pm UTC](https://forum.inductiveautomation.com/t/question-about-date-formatting-in-perspective-exports/97038/11 "2024-11-25T23:26:49Z")

</div>

I was not familiar with the Unix Epoch timestamp standard before getting an eport from an Ignition Perspective application. On StackOverflow ([datetime - Converting unix time into date-time via excel - Stack Overflow](https://stackoverflow.com/questions/46130132/converting-unix-time-into-date-time-via-excel)), I found this Excel conversion to be very useful:

```python
=TEXT(C2/(1000*60*60*24)+25569,"YYYY-MM-DD HH:MM:SS")

```
