Database table query for reporting

Hi Ignition community👋🏾

I’m working on a personal project to learn more about the reporting module on ignition but i’m currently running into a slight issue .

Basically, I want to create a reporting data source that is a sql query of a db table but I want a way for that query to retrieve only the rows where the column t_stamp is between the parameter {StartDate} and {EndDate}

So far i’m getting a parsing error because I think The datetime are not on the same format.

Has anyone had to query a specific range of a table for reporting? Any advice or insight would be greatly appreciated

Don't use curly brace substitutions with timestamps. Those are string conversion and substitution operations that are particularly unreliable with timestamps. Use a standard SQL query with ? substitutions (unquoted). That will pass the timestamp to JDBC in binary form as a true datetime object.

2 Likes

Phil, You Are The G.O.A.T. This worked perfectly. Thank you .