# Use Date range, start date and end date, to make sql queries for datetime

**URL:** <https://forum.inductiveautomation.com/t/use-date-range-start-date-and-end-date-to-make-sql-queries-for-datetime/61559>\
**Category:** Ignition\
**Tags:** scripting, vision\
**Created:** [July 6, 2022, 2:09pm UTC](https://forum.inductiveautomation.com/t/use-date-range-start-date-and-end-date-to-make-sql-queries-for-datetime/61559 "2022-07-06T14:09:56Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Skandan\_Vecham](https://avatars.discourse-cdn.com/v4/letter/s/8e7dd6/32.png) [@Skandan\_Vecham](https://forum.inductiveautomation.com/u/Skandan_Vecham)\
**Post date:** [July 6, 2022, 2:09pm UTC](https://forum.inductiveautomation.com/t/use-date-range-start-date-and-end-date-to-make-sql-queries-for-datetime/61559/1 "2022-07-06T14:09:56Z")

</div>

I have a database which I want to filter by the datetime column. I am trying to achieve this by using the date range component in the vision client. I am currently using the “Start Date” property and “End Date” property to set my desired range. But the start and date comes in a different format then what sql desires. Is there another way to get the required data?

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [July 6, 2022, 4:42pm UTC](https://forum.inductiveautomation.com/t/use-date-range-start-date-and-end-date-to-make-sql-queries-for-datetime/61559/2 "2022-07-06T16:42:41Z")

</div>

Use a named query with Date Value parameters. Then you don’t have string conversions.
