1 formatter : function(value, row) { 2 if(value != null){ 3 var date = new Date(value); 4 var y = date.getFullYear(); 5 var m = date.getMonth() + 1; 6 m = m < 10 ? ('0' + m) : m; 7 var d = date.getDate(); 8 d = d < 10 ? ('0' + d) : d; 9 var h = date.getHours(); 10 var minute = date.getMinutes(); 11 minute = minute < 10 ? ('0' + minute) : minute; 12 var second = date.getSeconds(); 13 second = second < 10 ? ('0' + second) : second; 14 return y + '-' + m + '-' + d+' '+h+':'+minute+":"+second; 15 }else{ 16 return ""; 17 } 18 }