0

I'm trying bind grid from a web api controller, the date column is displaying as: 2018-01-08T09:46:47.6451288.

I want to format the date and I have tried the below. I am assuming that it isn't parsed as a Date which is why it isn't being formatted.

How do I get it to come in as a parsed date from the controller?

Thanks in advance!

<kendo-grid-column field="createDate" title="Create Date" format="{0:MM/dd/yyyy}" width="125"> 
</kendo-grid-column>
Colburn
  • 1
  • 2
  • Have a look at this. https://stackoverflow.com/questions/36681078/angular-2-date-deserialization – Philipp Jan 18 '18 at 07:13
  • Can it not be returned from the web api controller parsed correctly? I am currently returning a Kendo.Mvc.UI.DataSourceResult using the kendo mvc ToDataSourceResult extension. – Colburn Jan 18 '18 at 14:47
  • This has nothing to do with web api, but more how JSON works with date objects, which are always strings. Anyway you can always convert the date-string to a date-object client-side. – Philipp Jan 18 '18 at 19:24

0 Answers0