I have a milliseconds integer, and I am trying to convert it to a readable date in the format of yyyy MM dd
(2014-08-06).
var maxDate = 1407267771429;
maxDate = new Date(maxDate);
maxDateFinal = maxDate.toString('yyyy MM dd');
Although, maxDateFinal
always seems to equal Wed Aug 06 2014 05:42:51 GMT+1000 (E. Australia Standard Time)
I have added console.log()
after each call in my fiddle to demonstrate the change of the variables, although it seems as if toString()
is doing absolutely nothing to the date at all.