# Perspective - SQL time field to date cast problem

**URL:** <https://forum.inductiveautomation.com/t/perspective-sql-time-field-to-date-cast-problem/87538>\
**Category:** Ignition\
**Tags:** ignition81, perspective\
**Created:** [March 19, 2024, 9:10am UTC](https://forum.inductiveautomation.com/t/perspective-sql-time-field-to-date-cast-problem/87538 "2024-03-19T09:10:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![davee\_s](https://avatars.discourse-cdn.com/v4/letter/d/e47774/32.png) [@davee\_s](https://forum.inductiveautomation.com/u/davee_s)\
**Post date:** [March 19, 2024, 9:10am UTC](https://forum.inductiveautomation.com/t/perspective-sql-time-field-to-date-cast-problem/87538/1 "2024-03-19T09:10:57Z")

</div>

Hello guys, I have a problem (Ignition 8.1.38) in Perspective with casting a time field retrieved from MySQL into a date to display in a datetime picker field.  
The field in MySQL has value of 08:00:00 AM, I created a custom property and binded a query to get data from SQL, then I binded the field with an expression like in the screenshot.  
The preview shows the right result but when saving, another value is shown I don't know why.  
Thanks

 ![Screenshot 2024-03-19 091716](https://us1.discourse-cdn.com/inductiveautomation/original/3X/c/c/cc653f96d59db42ea0c8996004c34a303f834054.png)
