Get month from DATETIME in sqlite

前端 未结 7 1237
温柔的废话
温柔的废话 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

    0 讨论(0)
提交回复
热议问题