# Timestamp format changes when I export data from a table to excel

**URL:** <https://forum.inductiveautomation.com/t/timestamp-format-changes-when-i-export-data-from-a-table-to-excel/28506>\
**Category:** Ignition\
**Tags:** ignition79\
**Created:** [September 24, 2019, 2:12pm UTC](https://forum.inductiveautomation.com/t/timestamp-format-changes-when-i-export-data-from-a-table-to-excel/28506 "2019-09-24T14:12:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jparsons](https://avatars.discourse-cdn.com/v4/letter/j/ea666f/32.png) [@jparsons](https://forum.inductiveautomation.com/u/jparsons)\
**Post date:** [September 24, 2019, 2:12pm UTC](https://forum.inductiveautomation.com/t/timestamp-format-changes-when-i-export-data-from-a-table-to-excel/28506/1 "2019-09-24T14:12:03Z")

</div>

Hello,

I have table data with a timestamp in the format of MMM dd, yyyy hh:mm a. When I export that table data to excel it comes in at hh:mm.s. I do all of the conversion in python. Is there anyway to adjust the way this imports so that the timestamp format stays the same?

Here is the code I am using:

```auto
component = event.source.parent.getComponent('Table')
csv = system.dataset.toCSV(component.data)
Filepath = system.file.openFile('csv','C:\\')
system.file.writeFile(Filepath, csv)

```

---

<div class="post-metadata">

**Author:** ![jparsons](https://avatars.discourse-cdn.com/v4/letter/j/ea666f/32.png) [@jparsons](https://forum.inductiveautomation.com/u/jparsons)\
**Post date:** [September 24, 2019, 3:00pm UTC](https://forum.inductiveautomation.com/t/timestamp-format-changes-when-i-export-data-from-a-table-to-excel/28506/2 "2019-09-24T15:00:17Z")

</div>

It fixed itself. I don’t know why but I am not going to question it.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [September 24, 2019, 3:23pm UTC](https://forum.inductiveautomation.com/t/timestamp-format-changes-when-i-export-data-from-a-table-to-excel/28506/3 "2019-09-24T15:23:58Z")

</div>

Depending on the excel version you have, a lot of times excel will automatically interpret the data and choose the “best” format for it. Pretty annoying sometimes. I believe you can alter it or turn it off in settings somewhere. not sure this was the cause, but very possible.
