# Easy Chart: convert varchar to datetime

**URL:** <https://forum.inductiveautomation.com/t/easy-chart-convert-varchar-to-datetime/59822>\
**Category:** Ignition\
**Tags:** ignition81\
**Created:** [May 20, 2022, 8:05am UTC](https://forum.inductiveautomation.com/t/easy-chart-convert-varchar-to-datetime/59822 "2022-05-20T08:05:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ignition\_Tourists](https://avatars.discourse-cdn.com/v4/letter/i/e56c9b/32.png) [@Ignition\_Tourists](https://forum.inductiveautomation.com/u/Ignition_Tourists)\
**Post date:** [May 20, 2022, 8:05am UTC](https://forum.inductiveautomation.com/t/easy-chart-convert-varchar-to-datetime/59822/1 "2022-05-20T08:05:14Z")

</div>

Hi All,

I want to Chart Value from a data base with Easy Chart. In my table the date has the format yyyy-mm-ddT hh:mm:ssZ as a VARCHAR.  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/1/7/1776d68c213327870dc0b2c69396a051c9789136.png)

In Easy Chart Customizer when I select the time Column i have this error: “The type of time column ‘date’ is not a date”.

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

This is normal because date is a VARCHAR  
 ![image](https://us1.discourse-cdn.com/inductiveautomation/original/3X/3/d/3d0c317de355e8a2991ca13970b582779da40076.png)

In Easy Chart, how or where can i convert this VARCHAR to a datetime?

Thank you for you help!

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [May 20, 2022, 12:01pm UTC](https://forum.inductiveautomation.com/t/easy-chart-convert-varchar-to-datetime/59822/2 "2022-05-20T12:01:13Z")

</div>

You will need to create a view in your database that uses CAST() or CONVERT(). Supply the view name instead of the table name.
