# Cannot Coerce value into type class.java.date

**URL:** <https://forum.inductiveautomation.com/t/cannot-coerce-value-into-type-class-java-date/69445>\
**Category:** Maker\
**Created:** [February 4, 2023, 12:46am UTC](https://forum.inductiveautomation.com/t/cannot-coerce-value-into-type-class-java-date/69445 "2023-02-04T00:46:28Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![drewdin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drewdin/32/3363_2.png) [@drewdin](https://forum.inductiveautomation.com/u/drewdin)\
**Post date:** [February 4, 2023, 12:46am UTC](https://forum.inductiveautomation.com/t/cannot-coerce-value-into-type-class-java-date/69445/1 "2023-02-04T00:46:28Z")

</div>

I have a date in mysql, i have a query that pulls the date onto the screen to be displayed. The date in the database "2023-02-03 10:10:10" gets displayed in epoch time when queried "121234124144124124"

When i try to run a transform or expression to convert the epoch to a date i get the error in the title. I can script something to fix it but i figured I could do this out of the box.

Anyone have any suggestions? Thanks

---

<div class="post-metadata">

**Author:** ![justinedwards.jle](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/justinedwards.jle/32/37854_2.png) [@justinedwards.jle](https://forum.inductiveautomation.com/u/justinedwards.jle)\
**Post date:** [February 4, 2023, 8:16am UTC](https://forum.inductiveautomation.com/t/cannot-coerce-value-into-type-class-java-date/69445/2 "2023-02-04T08:16:39Z")

</div>

I'm not familiar with maker edition, but I remember encountering a similar problem in Perspective a little while back, and this was the solution:

> [@Two Tables Question Using Text Fields](https://forum.inductiveautomation.com/t/two-tables-question-using-text-fields/64485/9):
>
> you need to add a mapping to those three text fields to map their values to a datetime Here i added a custom property called valueIn (that’s where you’d be writing your value to instead of the text property) Then add a binding on text to this.custom.valueIn and finally a Format Transform setup with whichever datetime format you want to display

---

<div class="post-metadata">

**Author:** ![drewdin](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/drewdin/32/3363_2.png) [@drewdin](https://forum.inductiveautomation.com/u/drewdin)\
**Post date:** [February 5, 2023, 2:36am UTC](https://forum.inductiveautomation.com/t/cannot-coerce-value-into-type-class-java-date/69445/3 "2023-02-05T02:36:11Z")

</div>

Thanks, I just ended up using a scalar query and it worked fine with a format binding. The issue was that it was returning a dataset. thanks though
