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?
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.
It's clear that you are not passing a date to the query. The error message says cannot cast jsonObject to date.
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.
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.
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.


