Convert timestamp to string in Javascript

var timestamp = 1330056000000;
startDate = new Date(ev.date);

var month = startDate.getUTCMonth();
var day = startDate.getUTCDate();
var year = startDate.getUTCFullYear();

newdate = year + "/" + month + "/" + day;

Leave a Reply

Close Menu
%d bloggers like this: