JSON 将JSON字符串(日期类型,毫秒数)转成日期正常格式


 //将序列化成json日期字符串(毫秒数)转成正常日期格式
        function ChangeDateFormat(cellval) {
            var date = new Date(parseInt(cellval.replace("/Date(", "").replace(")/", ""), 10));
            var month = date.getMonth() + 1 < 10 ? "0" + (date.getMonth() + 1) : date.getMonth() + 1;
            var currentDate = date.getDate() < 10 ? "0" + date.getDate() : date.getDate();
            return date.getFullYear() + "-" + month + "-" + currentDate;
        



你可能感兴趣的:(JSON,JQuery,Ajax,ASP.NET)