Report showing incorrect date

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.

1 Like
  1. What version are you using?
  2. Is your gateway in a different time zone than the designer?
  1. We are using Ignition version 7.9.0
  2. Yes, the gateway is two hours ahead of me.

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.

Thanks Kathy. I’ll try emailing them.

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

Check the docs on query data sources in reporting – you need to do the parameters a little differently.