Hi I am using Kendo.MVC.dll:
In MS Sql (2012) table I have column:
Day Data Type datetime
In the controller I get the data using"
public ActionResult BloodPressure_Read([DataSourceRequest] DataSourceRequest request)
{
return Json(BPRepository.All().ToDataSourceResult(request));
}
In the view:
@(Html.Kendo().Grid<BPViewModel>()
.Name("Grid")
.Columns(columns =>
columns.Bound(p => p.Day).Format("{0:d}");
The date is displayed as 1/1/2012; however when I edit it (using Ajax) it shows as Sun Jan 1 00:00:00 PST 2012!! When I try to update the row, I get "Day is invalid Date.
Any idea how I can convert the date to yyyy,mm, dd?
Thanks in advance.
In MS Sql (2012) table I have column:
Day Data Type datetime
In the controller I get the data using"
public ActionResult BloodPressure_Read([DataSourceRequest] DataSourceRequest request)
{
return Json(BPRepository.All().ToDataSourceResult(request));
}
In the view:
@(Html.Kendo().Grid<BPViewModel>()
.Name("Grid")
.Columns(columns =>
columns.Bound(p => p.Day).Format("{0:d}");
The date is displayed as 1/1/2012; however when I edit it (using Ajax) it shows as Sun Jan 1 00:00:00 PST 2012!! When I try to update the row, I get "Day is invalid Date.
Any idea how I can convert the date to yyyy,mm, dd?
Thanks in advance.