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

前端 未结 2 887
广开言路
广开言路 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 03:56

    This is probably not optimal, but you could use:

    select column_name from table_name where strftime('%Y-%m', column_name) = '2011-05';
    

提交回复
热议问题