//Pass in the date type data taken from the database
function getformatdate(d){
var formate_datetime;
var array = d.split(" ");
var date = array[0];
var time = array[1];
var array_date = date.split("-");
var array_time = time.split(":");
var second = array_time[2].split(".")[0];
formate_datetime = array_date[0] "Year" removeZero(array_date[1]) "Month" removeZero(array_date[2]) "Day"
removeZero(array_time[0]) "Hour" removeZero(array_time[1] ) "minute" second "second";
return formate_datetime;
}
//Remove the 0 before the month, day, hour and minute
function removeZero(data)
{
if(data.charAt(0) == "0"){
return data.charAt(1);
}
else
{
return data;
}
}