Inserting mm/dd/yyyy format dates in MySQL

后端 未结 2 569
渐次进展
渐次进展 2020-12-10 08:03

How can I insert an MM/DD/YYYY format date into an MySQL database using PHP?

2条回答
  •  再見小時候
    2020-12-10 08:46

    MySQL support ISO-8601 date/time values, and no others. If you need to use some other whacky format (for example, because you have American customers who expect wonky dates), you need to do the conversion yourself.

    Just live with it, ISO-8601 is the one true date format.

提交回复
热议问题