I am trying to convert a MySQL date to euro date with JavaScript. but no success. My code is:
var t = "2014-03-29 13:12:01".split(/[- :]/);
// Apply each element to the Date function
var d = new Date(t[0], t[1]-1, t[2], t[3], t[4], t[5]);
alert(d);
I get a result of something like this: Sat Mar 29 2014 23:24:28
Is there a way to set it to something like 31.12.2014
with JavaScript? I can't use a server side language such as PHP.