# Report Designer, expression parameter

**URL:** <https://forum.inductiveautomation.com/t/report-designer-expression-parameter/18063>\
**Category:** Ignition\
**Created:** [May 16, 2018, 3:28pm UTC](https://forum.inductiveautomation.com/t/report-designer-expression-parameter/18063 "2018-05-16T15:28:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MoisesZV](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@MoisesZV](https://forum.inductiveautomation.com/u/MoisesZV)\
**Post date:** [May 16, 2018, 3:28pm UTC](https://forum.inductiveautomation.com/t/report-designer-expression-parameter/18063/1 "2018-05-16T15:28:37Z")

</div>

Hi, I’m trying to use an expression to transform seconds from a query to and especific format: “HH:mm:ss”.  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/4/4f60edd58c98297c4dfbe1bc5c2bda50cd617559.jpg)  
 ![](https://us1.discourse-cdn.com/inductiveautomation/original/2X/8/82853911197c3cdba36547c8a9c09aa8393b9362.jpg)

Which is the best way to do this?

---

<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:** [May 16, 2018, 3:54pm UTC](https://forum.inductiveautomation.com/t/report-designer-expression-parameter/18063/2 "2018-05-16T15:54:52Z")

</div>

What RDBMS are you using (Microsoft SQL Server, MySQL, etc)? Doing this within the query is ideal, because then all the logic is in one place. There may even be a built in function in the DB to do this for you:  
[https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function\_sec-to-time](https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_sec-to-time)

---

<div class="post-metadata">

**Author:** ![MoisesZV](https://avatars.discourse-cdn.com/v4/letter/m/e68b1a/32.png) [@MoisesZV](https://forum.inductiveautomation.com/u/MoisesZV)\
**Post date:** [May 16, 2018, 4:02pm UTC](https://forum.inductiveautomation.com/t/report-designer-expression-parameter/18063/3 "2018-05-16T16:02:01Z")

</div>

I’m using mysql. thanks for the answer, I changed the query to this:

```auto
SELECT SEC_TO_TIME(Sum(detenciones.tiempo_detenido)) AS Suma_tiempo_detenido
FROM detenciones

```

Now is working, thank you for the help PGriffith.
