# Gantt chart date conversion problem

**URL:** <https://forum.inductiveautomation.com/t/gantt-chart-date-conversion-problem/10982>\
**Category:** Ignition\
**Created:** [January 4, 2016, 4:13pm UTC](https://forum.inductiveautomation.com/t/gantt-chart-date-conversion-problem/10982 "2016-01-04T16:13:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Fabrice\_CHAVEROT](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@Fabrice\_CHAVEROT](https://forum.inductiveautomation.com/u/Fabrice_CHAVEROT)\
**Post date:** [January 4, 2016, 4:13pm UTC](https://forum.inductiveautomation.com/t/gantt-chart-date-conversion-problem/10982/1 "2016-01-04T16:13:17Z")

</div>

I have bind the Gantt chart data property to this sql query (SQL server 2014)

SELECT nom,date\_debut,date\_fin,avancement  
FROM gmao\_evenement  
WHERE centraleid={gmao.CentraleID}

where date\_debut and date\_fin are sql server DATE columns  
and I have a Java date conversion error ‘Gantt chart data incorrect. Second column must be a Date (StartDate)’

I have tried this :

SELECT nom,format(date\_debut,‘dd/MM/yyyy’,‘en-US’) as date\_debut,format(date\_fin,‘dd/MM/yyyy’,‘en-US’) as date\_fin,avancement  
FROM gmao\_evenement  
WHERE centraleid={gmao.CentraleID}

but I have the same error.

How can I do ?

---

<div class="post-metadata">

**Author:** ![Fabrice\_CHAVEROT](https://avatars.discourse-cdn.com/v4/letter/f/ecc23a/32.png) [@Fabrice\_CHAVEROT](https://forum.inductiveautomation.com/u/Fabrice_CHAVEROT)\
**Post date:** [January 4, 2016, 5:01pm UTC](https://forum.inductiveautomation.com/t/gantt-chart-date-conversion-problem/10982/2 "2016-01-04T17:01:42Z")

</div>

I have found the problem, I must convert my DATE columns to DATETIME columns like thet:

SELECT nom,  
convert(datetime,date\_debut),  
convert(datetime,date\_fin),  
avancement  
FROM gmao\_evenement  
WHERE centraleid={gmao.CentraleID}

and now it works !
