# Usage of start date and end date parameters in Report Query

**URL:** <https://forum.inductiveautomation.com/t/usage-of-start-date-and-end-date-parameters-in-report-query/26858>\
**Category:** Ignition\
**Created:** [July 24, 2019, 9:32pm UTC](https://forum.inductiveautomation.com/t/usage-of-start-date-and-end-date-parameters-in-report-query/26858 "2019-07-24T21:32:01Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vip.marwah75](https://avatars.discourse-cdn.com/v4/letter/v/e95f7d/32.png) [@vip.marwah75](https://forum.inductiveautomation.com/u/vip.marwah75)\
**Post date:** [July 24, 2019, 9:32pm UTC](https://forum.inductiveautomation.com/t/usage-of-start-date-and-end-date-parameters-in-report-query/26858/1 "2019-07-24T21:32:01Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [July 24, 2019, 9:40pm UTC](https://forum.inductiveautomation.com/t/usage-of-start-date-and-end-date-parameters-in-report-query/26858/2 "2019-07-24T21:40:20Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Matrix\_Engineering](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/matrix_engineering/32/19781_2.png) [@Matrix\_Engineering](https://forum.inductiveautomation.com/u/Matrix_Engineering)\
**Post date:** [July 24, 2019, 9:48pm UTC](https://forum.inductiveautomation.com/t/usage-of-start-date-and-end-date-parameters-in-report-query/26858/3 "2019-07-24T21:48:40Z")

</div>

Explained here: [https://www.inductiveuniversity.com/videos/sql-query/7.9](https://www.inductiveuniversity.com/videos/sql-query/7.9)

---

<div class="post-metadata">

**Author:** ![vip.marwah75](https://avatars.discourse-cdn.com/v4/letter/v/e95f7d/32.png) [@vip.marwah75](https://forum.inductiveautomation.com/u/vip.marwah75)\
**Post date:** [July 25, 2019, 1:33pm UTC](https://forum.inductiveautomation.com/t/usage-of-start-date-and-end-date-parameters-in-report-query/26858/4 "2019-07-25T13:33:22Z")

</div>

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!
