# Report showing incorrect date

**URL:** <https://forum.inductiveautomation.com/t/report-showing-incorrect-date/12435>\
**Category:** Ignition\
**Created:** [December 6, 2016, 9:50pm UTC](https://forum.inductiveautomation.com/t/report-showing-incorrect-date/12435 "2016-12-06T21:50:49Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![collink](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@collink](https://forum.inductiveautomation.com/u/collink)\
**Post date:** [December 6, 2016, 9:50pm UTC](https://forum.inductiveautomation.com/t/report-showing-incorrect-date/12435/1 "2016-12-06T21:50:49Z")

</div>

In my report, the StartDate parameter’s default value is toDate(‘2016-11-01 00:00:00’).

If I drag the StartDate parameter onto the report designer and set the text component’s date format to d-MMM-yyyy HH:mm:ss, the preview displays 31-Oct-2016 23:00:00.

If I add a string parameter and set its default value to dateFormat({StartDate}, “d-MMM-yyyy HH:mm:ss”) and drag it onto the designer, the preview correctly displays 1-Nov-2016 00:00:00.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [December 6, 2016, 11:11pm UTC](https://forum.inductiveautomation.com/t/report-showing-incorrect-date/12435/2 "2016-12-06T23:11:10Z")

</div>

1. What version are you using?
2. Is your gateway in a different time zone than the designer?

---

<div class="post-metadata">

**Author:** ![collink](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@collink](https://forum.inductiveautomation.com/u/collink)\
**Post date:** [December 6, 2016, 11:59pm UTC](https://forum.inductiveautomation.com/t/report-showing-incorrect-date/12435/3 "2016-12-06T23:59:59Z")

</div>

1. We are using Ignition version 7.9.0
2. Yes, the gateway is two hours ahead of me.

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [December 7, 2016, 3:19pm UTC](https://forum.inductiveautomation.com/t/report-showing-incorrect-date/12435/4 "2016-12-07T15:19:29Z")

</div>

Hmm… not sure what’s going on then. I’d suggest emailing/calling support and have them work with you on it, since they are set up to reproduce this a bit better than I am.

---

<div class="post-metadata">

**Author:** ![collink](https://avatars.discourse-cdn.com/v4/letter/c/c67d28/32.png) [@collink](https://forum.inductiveautomation.com/u/collink)\
**Post date:** [December 8, 2016, 12:56am UTC](https://forum.inductiveautomation.com/t/report-showing-incorrect-date/12435/5 "2016-12-08T00:56:14Z")

</div>

Thanks Kathy. I’ll try emailing them.

---

<div class="post-metadata">

**Author:** ![tom.ha](https://avatars.discourse-cdn.com/v4/letter/t/8491ac/32.png) [@tom.ha](https://forum.inductiveautomation.com/u/tom.ha)\
**Post date:** [December 12, 2019, 5:37pm UTC](https://forum.inductiveautomation.com/t/report-showing-incorrect-date/12435/6 "2019-12-12T17:37:57Z")

</div>

Hi Kathy,

I have a problem to binding Datetime SQL data and dateRange on report viewer window. When I change dateRange, the data on table do not change.

In data report design:

SELECT `Hum`,`Temp`,`Pressure`,`t_stamp`  
FROM table  
Where t\_stamp \>= ‘{StartDate}’ AND  
t\_stamp \<= ‘{EndDate}’

but executive , error happed:

Incorrect DATETIME value: ‘{StartDate}’  
How I fixed datetime syntax to binding with dateRange in report viewer  
Thank you very much

---

<div class="post-metadata">

**Author:** ![KathyApplebaum](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kathyapplebaum/32/7261_2.png) [@KathyApplebaum](https://forum.inductiveautomation.com/u/KathyApplebaum)\
**Post date:** [December 13, 2019, 3:28pm UTC](https://forum.inductiveautomation.com/t/report-showing-incorrect-date/12435/7 "2019-12-13T15:28:12Z")

</div>

Check [the docs](https://docs.inductiveautomation.com/display/DOC80/SQL+Query+Data+Source) on query data sources in reporting – you need to do the parameters a little differently.
