# Perspective Form Date-Time-Picker

**URL:** <https://forum.inductiveautomation.com/t/perspective-form-date-time-picker/113903>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [February 11, 2026, 1:52pm UTC](https://forum.inductiveautomation.com/t/perspective-form-date-time-picker/113903 "2026-02-11T13:52:33Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ros\_Alexander1](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Ros\_Alexander1](https://forum.inductiveautomation.com/u/Ros_Alexander1)\
**Post date:** [February 11, 2026, 1:52pm UTC](https://forum.inductiveautomation.com/t/perspective-form-date-time-picker/113903/1 "2026-02-11T13:52:33Z")

</div>

I want to have an operator select the start date/time and a finish date/time and submit the form. I have a named insert query to push that information to my SQL database. I keep getting an error that looks like it is the wrong data type. I have the start and finish date as DateTime for my named query and in my SQL table as a datime2(7) data type. Is it something to do with the JSON object having a formatted value and value it is trying to pass?

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/7/2/7272f529a0d0c60434d95868bc3fb22bf64c555c.png)

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [February 11, 2026, 1:58pm UTC](https://forum.inductiveautomation.com/t/perspective-form-date-time-picker/113903/2 "2026-02-11T13:58:14Z")

</div>

Show the full details - copy and paste the stack trace and format it in a post. Also show your code. I suspect its how your supplying the date to your NQ based on that last line. However you are trying to supply your start/end times Ignition is try to coerce into a date but cannot. You need to show your code / how your doing it.

---

<div class="post-metadata">

**Author:** ![dkhayes117](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/dkhayes117/32/68344_2.png) [@dkhayes117](https://forum.inductiveautomation.com/u/dkhayes117)\
**Post date:** [February 11, 2026, 2:02pm UTC](https://forum.inductiveautomation.com/t/perspective-form-date-time-picker/113903/3 "2026-02-11T14:02:48Z")

</div>

It's clear that you are not passing a date to the query. The error message says `cannot cast jsonObject to date`.

---

<div class="post-metadata">

**Author:** ![Ros\_Alexander1](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Ros\_Alexander1](https://forum.inductiveautomation.com/u/Ros_Alexander1)\
**Post date:** [February 11, 2026, 2:04pm UTC](https://forum.inductiveautomation.com/t/perspective-form-date-time-picker/113903/4 "2026-02-11T14:04:52Z")

</div>

![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/b/6/b6c876defcb68aeb3224007cd05a3a0374ac77ed.png)

 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/8/0/802b2a6a3042a7459d7ac6e19a46ca6f6e7b25de.png)

---

<div class="post-metadata">

**Author:** ![bkarabinchak.psi](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/bkarabinchak.psi/32/83567_2.png) [@bkarabinchak.psi](https://forum.inductiveautomation.com/u/bkarabinchak.psi)\
**Post date:** [February 11, 2026, 2:07pm UTC](https://forum.inductiveautomation.com/t/perspective-form-date-time-picker/113903/5 "2026-02-11T14:07:27Z")

</div>

Is there a submit button that grabs your form values runs a `system.db.runNamedQuery` ? That is where the issue is. If this is that new Forms thing and it does it automatically I am not familiar and am tapping out. But the issue is when you try to provide your params to your NQ, Ignition tries to coerce them to your designated type and that is what is breaking.

---

<div class="post-metadata">

**Author:** ![Ros\_Alexander1](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Ros\_Alexander1](https://forum.inductiveautomation.com/u/Ros_Alexander1)\
**Post date:** [February 11, 2026, 2:10pm UTC](https://forum.inductiveautomation.com/t/perspective-form-date-time-picker/113903/6 "2026-02-11T14:10:10Z")

</div>

Yes, I'm using the new Forms component. It's been a bit burdensome. I may just go back and build my own page. I've used Forms before, but this is my first time with selecting a date/time widget.

---

<div class="post-metadata">

**Author:** ![pamato](https://avatars.discourse-cdn.com/v4/letter/p/c68b51/32.png) [@pamato](https://forum.inductiveautomation.com/u/pamato)\
**Post date:** [February 11, 2026, 5:14pm UTC](https://forum.inductiveautomation.com/t/perspective-form-date-time-picker/113903/7 "2026-02-11T17:14:18Z")

</div>

What data value are you setting for that DB field? The form data for a data time widget is an object which contains two keys (`formattedValue` and `value`). The `formattedValue` is a string that matches your configured format (ex: `Feb 5, 2026 12:00 AM`). The value is the string version of the native JS Date object (ex: `2026-02-05T05:00:00.000Z`).

> Yes, I'm using the new Forms component. It's been a bit burdensome.

What issues (usability or complexity) are you finding with the Form component? It is a pretty complex component so any feedback or insight you can provide would help.

---

<div class="post-metadata">

**Author:** ![Ros\_Alexander1](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Ros\_Alexander1](https://forum.inductiveautomation.com/u/Ros_Alexander1)\
**Post date:** [February 11, 2026, 8:15pm UTC](https://forum.inductiveautomation.com/t/perspective-form-date-time-picker/113903/8 "2026-02-11T20:15:32Z")

</div>

How do I only pass the formattedValue with the form fire submission event? I'm passing both and that is causing part of the issue. I could just build a new page and make this all work but that won't help me get better with the Form component.

---

<div class="post-metadata">

**Author:** ![pamato](https://avatars.discourse-cdn.com/v4/letter/p/c68b51/32.png) [@pamato](https://forum.inductiveautomation.com/u/pamato)\
**Post date:** [February 11, 2026, 8:41pm UTC](https://forum.inductiveautomation.com/t/perspective-form-date-time-picker/113903/9 "2026-02-11T20:41:17Z")

</div>

There are currently only a few ways to configure the form data value on submission (and not on a per widget type basis). However, you can manipulate the form data dictionary in your form submission handler before you push that information to your DB.

---

<div class="post-metadata">

**Author:** ![Ros\_Alexander1](https://avatars.discourse-cdn.com/v4/letter/r/db5fbb/32.png) [@Ros\_Alexander1](https://forum.inductiveautomation.com/u/Ros_Alexander1)\
**Post date:** [February 15, 2026, 3:00pm UTC](https://forum.inductiveautomation.com/t/perspective-form-date-time-picker/113903/10 "2026-02-15T15:00:12Z")

</div>

could you please give me an example. I'm not sure how to move forward.

---

<div class="post-metadata">

**Author:** ![pamato](https://avatars.discourse-cdn.com/v4/letter/p/c68b51/32.png) [@pamato](https://forum.inductiveautomation.com/u/pamato)\
**Post date:** [February 17, 2026, 6:54pm UTC](https://forum.inductiveautomation.com/t/perspective-form-date-time-picker/113903/11 "2026-02-17T18:54:21Z")

</div>

You would want to create a new dictionary to pass to `system.db.runNamedQuery`. So if you want to use the `formattedValue` data of the date time widget (the example below has a widget `id` of `datetime`), the data can be generated by something like the following:

```python
dbEntry = data
dbEntry["datetime"] = data.datetime.formattedValue

```
