Call
Changedateformat (Creattime)
JSON date Conversion
function Changedateformat (jsondate) {
Jsondate = Jsondate.replace ("/date (", ""). Replace (")/", "");
if (Jsondate.indexof ("+") > 0) {
Jsondate = jsondate.substring (0, Jsondate.indexof ("+"));
}
else if (Jsondate.indexof ("-") > 0) {
Jsondate = jsondate.substring (0, Jsondate.indexof ("-"));
}
var date = new Date (parseint (Jsondate, 10));
var month = Date.getmonth () + 1 < 10? "0" + (date.getmonth () + 1): Date.getmonth () + 1;
var currentdate = date.getdate () < 10? "0" + date.getdate (): Date.getdate ();
var hours = date.gethours () < 10? "0" + date.gethours (): Date.gethours ();
var minutes = Date.getminutes () < 10? "0" + date.getminutes (): Date.getminutes ();
var seconds = date.getseconds () < 10? "0" + date.getseconds (): Date.getseconds ();
Return Date.getfullyear ()
+ "-"
+ Month
+ "-"
+ currentdate
+ " "
+ " "
+ hours
+ ":"
+ minutes
+ ":"
+seconds;
}
JSON date Conversion