# SQL Query Date returns Date & Time

**URL:** <https://forum.inductiveautomation.com/t/sql-query-date-returns-date-time/36482>\
**Category:** Ignition\
**Created:** [July 8, 2020, 1:23pm UTC](https://forum.inductiveautomation.com/t/sql-query-date-returns-date-time/36482 "2020-07-08T13:23:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kyle.lawson](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@kyle.lawson](https://forum.inductiveautomation.com/u/kyle.lawson)\
**Post date:** [July 8, 2020, 1:23pm UTC](https://forum.inductiveautomation.com/t/sql-query-date-returns-date-time/36482/1 "2020-07-08T13:23:55Z")

</div>

Hello,

I have a SQL Table with a column of “Date” type. When I query it in SQL all that is returned is a date which is what I need. When I do the same query in Ignition its adding a time to the date rather than just returning the date. I tried using the SQL convert to date but that didn’t work either.

Basically I need to populate a date picker date based on an sql entry but its not working since its coming in as a date time format.

Any ideas?

---

<div class="post-metadata">

**Author:** ![code\_skin](https://avatars.discourse-cdn.com/v4/letter/c/43a26b/32.png) [@code\_skin](https://forum.inductiveautomation.com/u/code_skin)\
**Post date:** [July 8, 2020, 1:31pm UTC](https://forum.inductiveautomation.com/t/sql-query-date-returns-date-time/36482/2 "2020-07-08T13:31:36Z")

</div>

What happens when you change **props.pickerType = date** (default is datetime)?

---

<div class="post-metadata">

**Author:** ![kyle.lawson](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@kyle.lawson](https://forum.inductiveautomation.com/u/kyle.lawson)\
**Post date:** [July 8, 2020, 1:54pm UTC](https://forum.inductiveautomation.com/t/sql-query-date-returns-date-time/36482/3 "2020-07-08T13:54:24Z")

</div>

So I think i’ve narrowed it down to having something to do with the transform script on my dataset. As you can see under the selection field, the date looks like it comes in as a string maybe. What I am doing is populating a table and when the user selects a row, the date picker changes to what the date column is set to on the table.

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/9/0/90d86d7f441d707c76150339f3cba275f4a63080.png)

---

<div class="post-metadata">

**Author:** ![kyle.lawson](https://avatars.discourse-cdn.com/v4/letter/k/6de8d8/32.png) [@kyle.lawson](https://forum.inductiveautomation.com/u/kyle.lawson)\
**Post date:** [July 8, 2020, 3:54pm UTC](https://forum.inductiveautomation.com/t/sql-query-date-returns-date-time/36482/4 "2020-07-08T15:54:49Z")

</div>

I solved my own issue. Figured out I didn’t need to use a transform script and now the date comes into my field correctly. All is well. Thanks!
