I have something like /Date(1370001284000+0200)/
as timestamp. I guess it is a unix date, isn't it? How can I convert this to a date like this: 31.05.2013 13:54:44
I tried THIS converter for 1370001284 and it gives the right date. So it is in seconds.
But I still get the wrong date for:
var substring = unix_timestamp.replace("/Date(", "");
substring = substring.replace("000+0200)/", "");
var date = new Date();
date.setSeconds(substring);
return date;
1370001284000+0200
is not a valid timestamp because it looks like miliseconds, not seconds, and contains zone information. – Ceporahvar date = new Date( parseInt( substring, 10 ) );
– Racketeer