# SQLite Database: Adjusting Timestamp Format and Centering Data in Table Properties

**URL:** <https://forum.inductiveautomation.com/t/sqlite-database-adjusting-timestamp-format-and-centering-data-in-table-properties/92863>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [July 7, 2024, 12:57am UTC](https://forum.inductiveautomation.com/t/sqlite-database-adjusting-timestamp-format-and-centering-data-in-table-properties/92863 "2024-07-07T00:57:44Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ryan\_Crawford](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Ryan\_Crawford](https://forum.inductiveautomation.com/u/Ryan_Crawford)\
**Post date:** [July 7, 2024, 12:57am UTC](https://forum.inductiveautomation.com/t/sqlite-database-adjusting-timestamp-format-and-centering-data-in-table-properties/92863/1 "2024-07-07T00:57:44Z")

</div>

Good afternoon, everyone,

I am currently working on a project involving scrap tracking.

I am using an SQLite database at the moment and setting up queries to display database information in a table.

I have a couple of questions:

1. The format of the `t_stamp` field is unfamiliar to me. Is there a setting where I can change the format to HH:MM:SS DD-MM-YYYY or can I put a command in the query builder to convert the the time to the format I want?

2. Regarding the table properties, which setting controls the alignment of data?

Thanks team,

Ryan

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/4/940cd0c4f8847fe34ebab8803fae70b6071ec7c8.png)

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [July 7, 2024, 6:44am UTC](https://forum.inductiveautomation.com/t/sqlite-database-adjusting-timestamp-format-and-centering-data-in-table-properties/92863/2 "2024-07-07T06:44:03Z")

</div>

Hi, you can find all what you need under the columns properties, I cannot provide a screenshot now, but you have to set the columns name as in the sql query and then there are the align and the format properties to change.

Read this for example

> [@Perspective table date showing as number](https://forum.inductiveautomation.com/t/perspective-table-date-showing-as-number/59159):
>
> I have a table I am showing in perspective and my time stamp is displaying as a number instead of a date. when I execute the name query is shows as a date. the column is listed as date format and showing the date in the dataset editor. but for some reason it is displaying as a number in the table.

---

<div class="post-metadata">

**Author:** ![Ryan\_Crawford](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Ryan\_Crawford](https://forum.inductiveautomation.com/u/Ryan_Crawford)\
**Post date:** [July 7, 2024, 9:58pm UTC](https://forum.inductiveautomation.com/t/sqlite-database-adjusting-timestamp-format-and-centering-data-in-table-properties/92863/3 "2024-07-07T21:58:03Z")

</div>

Thanks for the reply. I have done that but the format has not changed, would there be something I am missing?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/9/793d1eac33ad8691228cc2d8df01200c107469a4.png)

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [July 8, 2024, 6:15am UTC](https://forum.inductiveautomation.com/t/sqlite-database-adjusting-timestamp-format-and-centering-data-in-table-properties/92863/4 "2024-07-08T06:15:50Z")

</div>

But the column name in the database is "t\_stamp" or "event\_time"?

---

<div class="post-metadata">

**Author:** ![Ryan\_Crawford](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Ryan\_Crawford](https://forum.inductiveautomation.com/u/Ryan_Crawford)\
**Post date:** [July 8, 2024, 11:48am UTC](https://forum.inductiveautomation.com/t/sqlite-database-adjusting-timestamp-format-and-centering-data-in-table-properties/92863/5 "2024-07-08T11:48:25Z")

</div>

In the screen shot it’s event\_time. I was testing and changed the column to match the example in the above post. The time seems to be in UTC time.

---

<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:** [July 8, 2024, 2:37pm UTC](https://forum.inductiveautomation.com/t/sqlite-database-adjusting-timestamp-format-and-centering-data-in-table-properties/92863/6 "2024-07-08T14:37:34Z")

</div>

Show us a screen shot of one or more rows of the table's `data` property. That will reveal the true column names.

---

<div class="post-metadata">

**Author:** ![Ryan\_Crawford](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Ryan\_Crawford](https://forum.inductiveautomation.com/u/Ryan_Crawford)\
**Post date:** [July 8, 2024, 4:32pm UTC](https://forum.inductiveautomation.com/t/sqlite-database-adjusting-timestamp-format-and-centering-data-in-table-properties/92863/7 "2024-07-08T16:32:14Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/1/b1902c467b1846384122003d37330a016884fe1e.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/a/c/ac63d693de0828662526cb10bce5ee1ee89240f4.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/d/b/dbfb9af60a90fff73221bd85e3ac2c727049cad2.png)  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/f/c/fca557976292e4b538205d6e1c281115e2a5b389.png)

---

<div class="post-metadata">

**Author:** ![Aiasa21](https://avatars.discourse-cdn.com/v4/letter/a/aeb1de/32.png) [@Aiasa21](https://forum.inductiveautomation.com/u/Aiasa21)\
**Post date:** [July 8, 2024, 5:02pm UTC](https://forum.inductiveautomation.com/t/sqlite-database-adjusting-timestamp-format-and-centering-data-in-table-properties/92863/8 "2024-07-08T17:02:54Z")

</div>

You need to change the render property

---

<div class="post-metadata">

**Author:** ![Ryan\_Crawford](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Ryan\_Crawford](https://forum.inductiveautomation.com/u/Ryan_Crawford)\
**Post date:** [July 9, 2024, 4:29pm UTC](https://forum.inductiveautomation.com/t/sqlite-database-adjusting-timestamp-format-and-centering-data-in-table-properties/92863/9 "2024-07-09T16:29:47Z")

</div>

I have done, but still does not change:  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/5/1/51eefcc64b8ed6c668bee2954e32a75edcf133a2.png)

---

<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:** [July 9, 2024, 4:48pm UTC](https://forum.inductiveautomation.com/t/sqlite-database-adjusting-timestamp-format-and-centering-data-in-table-properties/92863/10 "2024-07-09T16:48:24Z")

</div>

Your `event_time` column is type `text`. It needs to be a valid datetime column that maps to `java.util.Date` through JDBC.

(Why are you using SQLite? It is utterly broken for production use. Use PostgreSQL or MariaDB instead, if you need something free.)

---

<div class="post-metadata">

**Author:** ![Ryan\_Crawford](https://avatars.discourse-cdn.com/v4/letter/r/a587f6/32.png) [@Ryan\_Crawford](https://forum.inductiveautomation.com/u/Ryan_Crawford)\
**Post date:** [July 12, 2024, 9:44pm UTC](https://forum.inductiveautomation.com/t/sqlite-database-adjusting-timestamp-format-and-centering-data-in-table-properties/92863/11 "2024-07-12T21:44:06Z")

</div>

I did need up getting it in the end. I ended up switching to MySQL database and following the same setup and it seemed to work fine. Thanks for the support
