formatter: function(value,row,index){ var arr = value; if(arr==null || arr==""){ return "-"; }else{ for(var i = 0; i < arr.length; i++){ if(arr[i].length == 1){ arr[i] = "0" + arr[i]; } } if(arr.length == 5){ var getFormatTime = arr[0] + "-" + arr[1] + "-" + arr[2] + " " + arr[3] + ":" + arr[4] + ":" + "00"; }else{ var getFormatTime = arr[0] + "-" + arr[1] + "-" + arr[2] + " " + arr[3] + ":" + arr[4] + ":" + arr[5]; } return getFormatTime; } }