Get month from DATETIME in sqlite

前端 未结 7 1336
温柔的废话
温柔的废话 2020-12-01 16:28

I am trying to get extract the month from a DATETIME field in SQLite. month(dateField) does not work as well as strftime(\'%m\', dateStart)

7条回答
  •  無奈伤痛
    2020-12-01 16:57

    SELECT strftime('%m', datefield) FROM table 
    

    If you are searching the month name, text month names does not seems to be supported by the core distribution of SQLite

提交回复
热议问题