Equivalent of strftime in Postgres

后端 未结 3 1986
甜味超标
甜味超标 2020-12-06 23:02

After migrating my SQLite database to Postgres on the development server, I get the

PG::UndefinedFunction: ERROR:  function strftime(unknown, date) does not         


        
3条回答
  •  自闭症患者
    2020-12-06 23:30

    Your best bet might be to_char().

    One alternative is to implement the behavior of strftime() as a user-defined function. (Named "strftime", of course.)

提交回复
热议问题