Insert current date in datetime format mySQL

后端 未结 15 1164
梦谈多话
梦谈多话 2020-12-02 05:38

I\'m having problems getting the date inserted properly into my database.

$date = date(\'m/d/Y h:i:s\', time());

I use this format, and, it

15条回答
  •  难免孤独
    2020-12-02 06:23

    "datetime" expects the date to be formated like this: YYYY-MM-DD HH:MM:SS

    so format your date like that when you are inserting.

提交回复
热议问题