Hi,
I have one table with relevant fiedls
Id Name Date
Id-Primary key
Name-nvarchar
Date=datetime
i am going to do crud operation for that table
coming to my requirement
After clicking of edit button in grid view relevant date is not dipslaying properly
i need to display in date format here it was diplaying in string format
https://ibb.co/sRDJkWJ
https://ibb.co/dBQN0QG
Code for edit
............................
$scope.employee = emp.dat
$scope.Id = state.Id;
$scope.Name = state.Name;
$scope.ToDate = state.ToDate;
Could please any one help me
Note:i am using anjularjs and mvc
Faisal PathanPosted Feb 4, 2019, 2:48 AM
var shortDate = null;
if (jsonDate) {
var regex = /-?\d+/;
var matches = regex.exec(jsonDate);
var dt = new Date(parseInt(matches[0]));
var month = dt.getMonth() + 1;
var monthString = month > 9 ? month : '0' + month;
var day = dt.getDate();
var dayString = day > 9 ? day : '0' + day;
var year = dt.getFullYear();
shortDate = dayString + '/' + monthString + '/' + year;
}
return shortDate;
};
Mahesh ReddyPosted Jan 26, 2019, 3:56 AM
Faisal PathanPosted Jan 25, 2019, 11:05 PM
Faisal PathanPosted Jan 25, 2019, 11:02 PM