Data format T00:00:00.000Z Database [GANTT]

1 Answer 4362 Views
Gantt
Valerius
Top achievements
Rank 1
Valerius asked on 14 Nov 2017, 09:36 AM

Hi, can you guys help me to format dates in gantt? If I've saving the times in the database, and there is something like Start - 2017-09-15T22:00:00.000Z, End - 2017-10-21T22:00:00.000Z Is there any way to remove this part of the data? 'T22:00:00.000Z'

I would like to save just only Start - 2017-09-15, End - 2017-10-21
Thanks

1 Answer, 1 is accepted

Sort by
0
Veselin Tsvetanov
Telerik team
answered on 16 Nov 2017, 07:58 AM
Hi Valerius,

The ISO 8601 date format with a Z zone designator signifies a UTC date value. The Gantt widget could not identify Timezones and displays all dates as they are stored in the DataSource. Therefore, the discussed format is the recommended one to store dates. It will result in a proper display of the dates in the widget.

In case you would like to alter the format used in your database, depending on the DB used, you should review the options for that specific technology. For example, "MySQL retrieves and displays DATETIME values in 'YYYY-MM-DD HH:MM:SS' format.". Nevertheless, you could use the DATE_FORMAT() function to format the retrieved value accordingly.

Regards,
Veselin Tsvetanov
Progress Telerik
Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Gantt
Asked by
Valerius
Top achievements
Rank 1
Answers by
Veselin Tsvetanov
Telerik team
Share this question
or