Json return date as timestamp to
convert that date to our normal date format we first convert timestamp to Date
. then we get day, month, year from Date and format it as dd/mm/yyyy or
mm/dd/yyyy or yyyy/mm/dd and other format.
function EditCheque(id) {
$.post("/Partner/ChqEdit", {
id: id }, function (data) {
var date = new
Date(parseInt(data.ChqDate.substr(6)));
$("#ChqDate").val( date.getDate() + '/' + (date.getMonth() + 1) + '/' + date.getFullYear());
});
No comments:
Post a Comment