# Display Data From Named Query (MySQL) On a Time series Chart

**URL:** <https://forum.inductiveautomation.com/t/display-data-from-named-query-mysql-on-a-time-series-chart/89955>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [May 6, 2024, 11:05am UTC](https://forum.inductiveautomation.com/t/display-data-from-named-query-mysql-on-a-time-series-chart/89955 "2024-05-06T11:05:07Z")\
**Posts on this page:** 2\
**Page:** 2

<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:** [May 6, 2024, 1:31pm UTC](https://forum.inductiveautomation.com/t/display-data-from-named-query-mysql-on-a-time-series-chart/89955/21 "2024-05-06T13:31:23Z")

</div>

Things you should have learned from this thread:

- Time Series charts require a time series column!
- The time series column has to be a DateTime type, not a string.
- Therefore the SQL query must return a DateTime, not a string.
- When someone suggests using  
`SELECT FLOOR(t_stamp / 3600000) * 3600000 AS Hour`  
and explains that "This will preserve the t\_stamp as a DateTime type."  
then converting it to  
`SELECT DATE_FORMAT(t_stamp, '%Y-%m-%d %H:00:00') AS Hour`  
isn't really taking their advice.

Have fun!

---

<div class="post-metadata">

**Author:** ![Joachim\_Govender](https://avatars.discourse-cdn.com/v4/letter/j/ed8c4c/32.png) [@Joachim\_Govender](https://forum.inductiveautomation.com/u/Joachim_Govender)\
**Post date:** [May 6, 2024, 7:22pm UTC](https://forum.inductiveautomation.com/t/display-data-from-named-query-mysql-on-a-time-series-chart/89955/22 "2024-05-06T19:22:06Z")

</div>

thank you, Noted sir

[Previous page](https://forum.inductiveautomation.com/t/display-data-from-named-query-mysql-on-a-time-series-chart/89955.md?page=1)
