When insert new Date mysql database more than one second

When using the new Date () into the database, check out more than the actual one second, mysql datetime type field is set to the table, when the time is accurate to the second, if more than 500 milliseconds, will automatically carry.

Solution is then formatted into the database.

Guess you like

Origin www.cnblogs.com/baiyifengyun/p/11145141.html