strftime error while switching my database from sqlite3 to mysql in Rails4

后端 未结 2 555
长情又很酷
长情又很酷 2020-12-07 06:11

Recently i changed my database from sqlite3 to mysql.When i ran my project i am getting this error in one of the file which is using this query.

date = Date.today +

2条回答
  •  青春惊慌失措
    2020-12-07 06:41

    There is no strftime function in MySQL. Use DATE_FORMAT instead.

    See Convert DateTime Value into String in Mysql for more examples.

提交回复
热议问题