# Transaction group date format

**URL:** <https://forum.inductiveautomation.com/t/transaction-group-date-format/53953>\
**Category:** Ignition\
**Created:** [December 9, 2021, 2:13pm UTC](https://forum.inductiveautomation.com/t/transaction-group-date-format/53953 "2021-12-09T14:13:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Resistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/resistor/32/30634_2.png) [@Resistor](https://forum.inductiveautomation.com/u/Resistor)\
**Post date:** [December 9, 2021, 2:13pm UTC](https://forum.inductiveautomation.com/t/transaction-group-date-format/53953/1 "2021-12-09T14:13:16Z")

</div>

How can I change the format of t\_stamp to a string ‘yyyy-mm-dd hh-mm-ss’ ?

It’s writing it in that format in my transaction group, and it’s a little annoying actually.

The testing query works and it should return all timestamps greater than that one, regardless of format there

---

<div class="post-metadata">

**Author:** ![Resistor](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/resistor/32/30634_2.png) [@Resistor](https://forum.inductiveautomation.com/u/Resistor)\
**Post date:** [December 9, 2021, 2:20pm UTC](https://forum.inductiveautomation.com/t/transaction-group-date-format/53953/2 "2021-12-09T14:20:29Z")

</div>

```auto
SELECT count(count1_ndx)-1 
FROM count1 
where t_stamp >= 1639054080

```

I get the same result: 18

---

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [December 9, 2021, 2:34pm UTC](https://forum.inductiveautomation.com/t/transaction-group-date-format/53953/3 "2021-12-09T14:34:16Z")

</div>

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

you can use this to convert (m)s to datedates there probabaly is another/better way too)

```auto
convert(datetime, dateadd(s, 1639054080, '1970-01-01'))
convert(datetime, dateadd(ms, 1639054080257, '1970-01-01'))

```
