我从数据库中获取日期值并尝试在视图中显示它,但问题是它没有显示为日期。当我尝试加载 2012-02-03 00:00:00.000 时,它显示如下 /Date(1328207400000)/ 。我正在使用 asp.net MVC 3
看法
<tbody id="Activities">
</tbody>
脚本
function GetFilteredActivities()
{
var selectedActivityId = $('#SelectedActionId').val();
$.getJSON('@Url.Action("GetFilteredActivityLogs", "Document")', { actionTypeId: selectedActivityId }, function (FilteredActivities)
{
var ActivitySelect = $('#Activities');
ActivitySelect.empty();
$.each(FilteredActivities, function (index, activity)
{
ActivitySelect.append("<tr><td>" + activity.EmployeeNo + "</td><td>" + activity.EmployeeName + "</td><td>" + activity.Description + "</td><td>" + activity.DateCreated + "</td></tr>");
});
});
}