# Time difference between SQL table and Ignition Perspective

**URL:** <https://forum.inductiveautomation.com/t/time-difference-between-sql-table-and-ignition-perspective/79133>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [September 14, 2023, 6:40am UTC](https://forum.inductiveautomation.com/t/time-difference-between-sql-table-and-ignition-perspective/79133 "2023-09-14T06:40:08Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Soundararajans\_S](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Soundararajans\_S](https://forum.inductiveautomation.com/u/Soundararajans_S)\
**Post date:** [September 14, 2023, 6:40am UTC](https://forum.inductiveautomation.com/t/time-difference-between-sql-table-and-ignition-perspective/79133/1 "2023-09-14T06:40:08Z")

</div>

Am facing an issue related to Time.

Am logging shift timing using update query to SQL table. The same vale am show cased in Table. I found time difference between both is showing 9 minutes something. Checked time zone and everything all are ok only.

![SQL Table](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/c/fc466ad19f7432e7265d30a377751ad6dcbefc6a.png)  
 ![ignition table](https://us1.discourse-cdn.com/inductiveautomation/original/3X/e/e/ee1577e8f82d65e97bc445dddb452aabc6febec4.png)

---

<div class="post-metadata">

**Author:** ![pascal.fragnoud](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pascal.fragnoud/32/24728_2.png) [@pascal.fragnoud](https://forum.inductiveautomation.com/u/pascal.fragnoud)\
**Post date:** [September 14, 2023, 6:55am UTC](https://forum.inductiveautomation.com/t/time-difference-between-sql-table-and-ignition-perspective/79133/2 "2023-09-14T06:55:49Z")

</div>

Is the database updated from the table you're showing us, or the other way around ?  
How are things updated/retrieved ?

A 9 minutes difference in ONE field is frankly weird. We need more details.

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [September 14, 2023, 7:03am UTC](https://forum.inductiveautomation.com/t/time-difference-between-sql-table-and-ignition-perspective/79133/3 "2023-09-14T07:03:47Z")

</div>

**A few troubleshooting questions:**  
• What is the datatype of the SQL columns?

• How is the table being populated; is it a binding or a script? Can we see it?

• Is the column's render property set to date or something else?

---

<div class="post-metadata">

**Author:** ![Soundararajans\_S](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Soundararajans\_S](https://forum.inductiveautomation.com/u/Soundararajans_S)\
**Post date:** [September 14, 2023, 7:06am UTC](https://forum.inductiveautomation.com/t/time-difference-between-sql-table-and-ignition-perspective/79133/4 "2023-09-14T07:06:56Z")

</div>

Table updated from time pick input.

Using runnamedquery data is updated to SQL.

Using query binding data is retrieved from SQL

---

<div class="post-metadata">

**Author:** ![Soundararajans\_S](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Soundararajans\_S](https://forum.inductiveautomation.com/u/Soundararajans_S)\
**Post date:** [September 14, 2023, 7:08am UTC](https://forum.inductiveautomation.com/t/time-difference-between-sql-table-and-ignition-perspective/79133/5 "2023-09-14T07:08:11Z")

</div>

SQL Column data type is Time(7),

Table populated by query binding only

Property set to time only

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [September 14, 2023, 7:36am UTC](https://forum.inductiveautomation.com/t/time-difference-between-sql-table-and-ignition-perspective/79133/6 "2023-09-14T07:36:51Z")

</div>

What does this look like in your data property?  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/0/f/0f5ff12879bb4b03150b1e6c8b0ea19658ea6340.png)

Are you doing any kind of formatting or transformation in your query?

---

<div class="post-metadata">

**Author:** ![Soundararajans\_S](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Soundararajans\_S](https://forum.inductiveautomation.com/u/Soundararajans_S)\
**Post date:** [September 14, 2023, 7:47am UTC](https://forum.inductiveautomation.com/t/time-difference-between-sql-table-and-ignition-perspective/79133/7 "2023-09-14T07:47:05Z")

</div>

There is no formatting or transformation is added. Time pick input value directly move to SQL query to insert the time.

In data showing like this

![data](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/2/121b22168d829d6c32c01fc41268cd294dc15582.png)

---

<div class="post-metadata">

**Author:** ![Soundararajans\_S](https://avatars.discourse-cdn.com/v4/letter/s/9f8e36/32.png) [@Soundararajans\_S](https://forum.inductiveautomation.com/u/Soundararajans_S)\
**Post date:** [September 14, 2023, 8:03am UTC](https://forum.inductiveautomation.com/t/time-difference-between-sql-table-and-ignition-perspective/79133/8 "2023-09-14T08:03:16Z")

</div>

Changed SQL column datatype to datetime from Time(7). Now its working fine. But in SQL table date and time both are showing. From that I show cased only Time in table.

![SQL Table](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/5/255772efa2049c85a53107aa0b324b91c922b628.png)  
 ![ignition table](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/6/d6ce6530ff1383679214bfd272fec415a8dace40.png)
