I am trying to convert milliseconds to a date using the javascript using:
new Date(Milliseconds);
constructor, but when I give it a milliseconds value of say 1372439683000 it returns invalid date. If I go to a site that converts milliseconds to date it returns the correct date.
Any ideas why?
alert(new Date(1372439683000));
works for me. What do you mean by "invalid date" exactly, what result are you getting? – AnatolioDate
object that stringifies to "Invalid Date
". (e.g., try outalert(new Date(""))
) – Tongs