MySQL insert to DATETIME: is it safe to use ISO::8601 format?

前端 未结 3 1406
暖寄归人
暖寄归人 2020-12-05 15:16

In our project we use Zend Framework Model generator, which produces something like this to set the properties that are stored in DB (MySQL) as DATETIME fields:



        
3条回答
  •  孤城傲影
    2020-12-05 15:25

    By default MySQL use ISO9075 format for datetime

    The possible values for the first and second arguments result in several possible format strings (for the specifiers used, see the table in the DATE_FORMAT() function description). ISO format refers to ISO 9075, not ISO 8601.

    http://dev.mysql.com/doc/refman/5.7/en/date-and-time-functions.html#function_get-format

提交回复
热议问题