JS millisecond time convert to date time
Copy code code as follows:
var &LDTIME = (new date ("2011/11/11 20:10:10"). Gettime (); // get milliseconds
Most of them are divided by milliseconds and divided by 365*24*60*60 & 1000. This method is too complicated to turn back. This method is too complicated. In 365 days, it is too complicated to calculate.
I tried a method later, but it was successful
Copy code code as follows:
var &LDTIME = (new date ("2011/11/11 20:10:10"). Gettime (); // get milliseconds
Var newtime = new date (oldtime); // get a normal time
Pass directly in the millisecond as a parameter, and give the Date object to get a normal time, and then obtain the year, month and day by get through Gethours, Getfullyear and other methods.