# Displaying MySQL "Time" correctly in Power Table

**URL:** <https://forum.inductiveautomation.com/t/displaying-mysql-time-correctly-in-power-table/107501>\
**Category:** Ignition\
**Tags:** vision, ignition81\
**Created:** [June 18, 2025, 2:22am UTC](https://forum.inductiveautomation.com/t/displaying-mysql-time-correctly-in-power-table/107501 "2025-06-18T02:22:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![richardNZ15](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/richardnz15/32/33373_2.png) [@richardNZ15](https://forum.inductiveautomation.com/u/richardNZ15)\
**Post date:** [June 18, 2025, 2:22am UTC](https://forum.inductiveautomation.com/t/displaying-mysql-time-correctly-in-power-table/107501/1 "2025-06-18T02:22:40Z")

</div>

Hi all,

Closely related to this topic:

> [@Power table does not display time period HH:MM etc](https://forum.inductiveautomation.com/t/power-table-does-not-display-time-period-hh-mm-etc/48249):
>
> hi I have simple SQL query returning time period but when connected to the data property of the power table it displays as date instead of time period HH:MM:SS Any idea how to change it? Regards

I want to be able to display a MySQL "Time" column in a Power Table, but it is not working properly.

The query returns the following for **TimeRemaining** when running it in a query execution tool:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/a/da14a8de80a66a0e54d2f8a0e85820e8be29169f.png)

But returns something quite different in the power table:

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/0/e08235efc138a95be8e0a735b92e14bc5d5fdeab.png)

I have used the following column formatting which I thought was reasonable for such a request.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/1/014d1ce286d079ecdfc38a973f1872cbcf02fdd9.png)

I believe the issue is that the red rows have a **negative time** value, ie: -ve 2hrs 37min.  
Which is then wrapping around 24hr time to be 22:37

Is there any other way to sort this out so it remains negative?

Non-negative times appear to display correctly.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/6/7/671d6fd5723d6e07b7b2fef5c6be72e786cf97ae.png)

NOTE: I can get it to work by casting as a string like suggested in the linked topic, but I'm interested to know why this isn't working as a datetime.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [June 18, 2025, 11:24am UTC](https://forum.inductiveautomation.com/t/displaying-mysql-time-correctly-in-power-table/107501/2 "2025-06-18T11:24:42Z")

</div>

Try extracting to millis and formatting manually.
