You could use this:
var str="2012-03-23 00:00:00";
function convert(a){
a=a.split(' ')[0].split('-');
var ret=[];
for(var i=a.length;0<=--i;){
ret.push(1===i?parseInt(a[i],10):a[i])
}
return ret.join("https://stackoverflow.com/");
}
alert(convert(str));
0
solved How to format isoDateTime to dd/m/yyyy