Usage of start date and end date parameters in Report Query

Hi I have simple query to be executed while designing a report in ignition.
SELECT DataDate, MeterID, AvgPressure, AvgTemp
FROM Meterdata
WHERE DATE(DataDate) = ‘{StartDate}’
I set the startdate value as “2019-07-22” , But I don’t get any output from the database.

But if I execute the query like below
SELECT DataDate, MeterID, AvgPressure, AvgTemp
FROM Meterdata
WHERE DATE(DataDate) = ‘2019-07-22’
I get all the rows from the database which has the date 2019-07-22

can any one help why it is like this and how it works

I don’t see any video or explanation by inductive automation which explains how to retrieve report data based on date parameters.

2 Likes

Use ? which will then open a new window at the bottom - in there put {StartDate}

Explained here: https://www.inductiveuniversity.com/videos/sql-query/7.9

1 Like

Thanks for your reply Metrix, It Worked.
Actually I tried this way before also but I passed the parameter as ‘{StartDate}’. Single Quotes were the problem.
Anyways Thanks Again. Cheers!

1 Like