How can I fetch the data of specific month from SQLite database

前端 未结 2 903
广开言路
广开言路 2021-01-03 03:36

I saved my data In SQLite Database. I saved my date in database as DATETIME datatype.

I want to retrive only the data of specific month from my SQLite databse.

2条回答
  •  南笙
    南笙 (楼主)
    2021-01-03 04:14

    Use a function retrieve only the month of the date

    SELECT strftime('%m', date(column_name)) FROM table;

    I believe this is the function, but I'm not so sure.

提交回复
热议问题