# Formatting Report Fields

**URL:** <https://forum.inductiveautomation.com/t/formatting-report-fields/6596>\
**Category:** Ignition\
**Created:** [May 29, 2013, 12:45am UTC](https://forum.inductiveautomation.com/t/formatting-report-fields/6596 "2013-05-29T00:45:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nate.Olson](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@Nate.Olson](https://forum.inductiveautomation.com/u/Nate.Olson)\
**Post date:** [May 29, 2013, 12:45am UTC](https://forum.inductiveautomation.com/t/formatting-report-fields/6596/1 "2013-05-29T00:45:27Z")

</div>

Hello,

I have a query that returns a dataset that is being used in a PDF report. I’m having trouble formatting a datetime field in the report details and noticed that in my dataset the column is defined as a string. I’m using a MySQL database and bringing the t\_stamp back by using from\_unixtime(t\_stamp/1000) and it looks like this in the dataset:

2013-05-09 04:23:53  
I want the report to format to MMMM d, yyyyy (May 9, 2013)

So my question is:  
Is there a way to convert this string in the report so I can format it as a date?  
Is there a way to change the datatype of a dataset column (string to date)?  
OR do I need modify my query in some way so that Ignition knows it’s a datatype date when creating the dataset from the query?

Thanks

---

<div class="post-metadata">

**Author:** ![CPowell](https://avatars.discourse-cdn.com/v4/letter/c/a183cd/32.png) [@CPowell](https://forum.inductiveautomation.com/u/CPowell)\
**Post date:** [May 30, 2013, 4:15am UTC](https://forum.inductiveautomation.com/t/formatting-report-fields/6596/2 "2013-05-30T04:15:54Z")

</div>

try

```auto
SELECT from_unixtime(t_stamp, '%M %d, %Y')
```

Cheers,  
Chris

---

<div class="post-metadata">

**Author:** ![Nate.Olson](https://avatars.discourse-cdn.com/v4/letter/n/35a633/32.png) [@Nate.Olson](https://forum.inductiveautomation.com/u/Nate.Olson)\
**Post date:** [May 30, 2013, 6:07pm UTC](https://forum.inductiveautomation.com/t/formatting-report-fields/6596/3 "2013-05-30T18:07:16Z")

</div>

Chris, formatting the date in the query itself worked great. Thank you.
