# SQLITE Audit Trail Event\_Timestamp

**URL:** <https://forum.inductiveautomation.com/t/sqlite-audit-trail-event-timestamp/89699>\
**Category:** Ignition\
**Tags:** vision\
**Created:** [April 30, 2024, 1:36pm UTC](https://forum.inductiveautomation.com/t/sqlite-audit-trail-event-timestamp/89699 "2024-04-30T13:36:53Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![colin\_doyle](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@colin\_doyle](https://forum.inductiveautomation.com/u/colin_doyle)\
**Post date:** [April 30, 2024, 1:36pm UTC](https://forum.inductiveautomation.com/t/sqlite-audit-trail-event-timestamp/89699/1 "2024-04-30T13:36:53Z")

</div>

Hi All,  
I am looking for some help in completing a project for collage.  
I have added a audit Trail to my project but the Event Timestamp is not in a time and date format.  
Could anyone give me a step by step guide on completing this if possible.

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/2/6/2666ae6bd15768aed6715ab32e79c490dc1de021.png)

---

<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:** [April 30, 2024, 1:39pm UTC](https://forum.inductiveautomation.com/t/sqlite-audit-trail-event-timestamp/89699/2 "2024-04-30T13:39:57Z")

</div>

Those are UNIX timestamps in milliseconds since 1970-01-01.

Ignition will usually convert those automatically when using calendar functions or date renderings in table columns1, etc.

All Ignition's scripting functions for date are listed here:

> **[system.date | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-date)**
>
> Date Functions

All Ignition's Expression Language functions are listed here:

> **[Date and Time | Ignition User Manual](https://docs.inductiveautomation.com/docs/8.1/appendix/expression-functions/date-and-time)**
>
> The following functions allow you to check or modify time values in expression bindings.

1 If you are using Perspective's Table component you need to specify the `columns.n.field` property to be equal to the column name. e.g..  
`columns.n.field : EVENT_TIMESTAMP`  
(if that's the name of the data column)  
Then on the same column,  
`columns.n.render : date`  
and all should be well.

---

<div class="post-metadata">

**Author:** ![colin\_doyle](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@colin\_doyle](https://forum.inductiveautomation.com/u/colin_doyle)\
**Post date:** [April 30, 2024, 1:48pm UTC](https://forum.inductiveautomation.com/t/sqlite-audit-trail-event-timestamp/89699/3 "2024-04-30T13:48:51Z")

</div>

Thank you for your reply Transistor. I am afraid I am learning as I go.  
I do not know where to go to change this so my time stamp looks correct.  
Would you be able to guide me through the process

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 30, 2024, 3:13pm UTC](https://forum.inductiveautomation.com/t/sqlite-audit-trail-event-timestamp/89699/4 "2024-04-30T15:13:30Z")

</div>

You don't change it. SQLite doesn't have a 'real' datetime type, so storing as epoch milliseconds is the best way to ensure no information is lost.

When you are _displaying_ the information from the audit log, you _may_ need to coerce the data representation...but probably not, because you should be using the built in functionality to query the audit log over writing your own SQL script. E.G. `system.util.queryAuditLog`: [system.util.queryAuditLog | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/appendix/scripting-functions/system-util/system-util-queryAuditLog)

---

<div class="post-metadata">

**Author:** ![colin\_doyle](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@colin\_doyle](https://forum.inductiveautomation.com/u/colin_doyle)\
**Post date:** [April 30, 2024, 5:16pm UTC](https://forum.inductiveautomation.com/t/sqlite-audit-trail-event-timestamp/89699/5 "2024-04-30T17:16:17Z")

</div>

Hi PGriffith

I am really struggling with this.i have not done any scripting but have used ignition for my collage project.  
But I don't understand how to convert this back to date time format in the audit trail

---

<div class="post-metadata">

**Author:** ![paul-griffith](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/paul-griffith/32/37249_2.png) [@paul-griffith](https://forum.inductiveautomation.com/u/paul-griffith)\
**Post date:** [April 30, 2024, 5:20pm UTC](https://forum.inductiveautomation.com/t/sqlite-audit-trail-event-timestamp/89699/6 "2024-04-30T17:20:14Z")

</div>

Use a function binding:

> **[Function Bindings | Ignition User Manual](https://www.docs.inductiveautomation.com/docs/8.1/ignition-modules/vision/binding-types-in-vision/function-bindings)**
>
> Binding Properties to Prebuilt Functions

> **[Function Binding Video at Inductive University](https://www.inductiveuniversity.com/video/function-binding/7.9)**
>
> This is a generic binding type that allows you to bind a dataset property to the results of a function. It allows any of the function's parameters to be calculated dynamically via Tag and property bindings. The function that you choose determines the...

---

<div class="post-metadata">

**Author:** ![colin\_doyle](https://avatars.discourse-cdn.com/v4/letter/c/b4bc9f/32.png) [@colin\_doyle](https://forum.inductiveautomation.com/u/colin_doyle)\
**Post date:** [April 30, 2024, 6:18pm UTC](https://forum.inductiveautomation.com/t/sqlite-audit-trail-event-timestamp/89699/7 "2024-04-30T18:18:59Z")

</div>

Thank you PGriffith.  
That worked for me.  
You are a legend,,👍
