I have a power table with a timestamp in mm dd, yyyy hh:mm:ss AM/PM format. I created an excel file with the System.Dataset.ExportExcel function with that dataset except that the timestamp just comes through as mm/dd/yy. The hour/minute/second format got lost in the process. Is there a way to ensure that this moves over to excel?
I just found that the full timestamp wasn’t lost, excel just sets it to “date” format. When you change the format of the column the time comes back. Is there a way to automatically set this in the ignition script?
There are a few examples in the forums here to do this.
Just search excel date and it will bring up some relevant topics.
One that can get you started is
Dataset export to Excel datetime conversion issue - Ignition - Inductive Automation Forum
Consider using the Apache POI libraries that come with Ignition to do a custom export. Then you can actually apply a desired datetime format to cells containing java dates. (The linked topic uses string formatting, which is lossy.)