【问题标题】:Sqlite between operator issue运算符之间的 Sqlite 问题
【发布时间】:2012-06-27 04:46:52
【问题描述】:

我需要查询来获取两天之间的数据。我试过这个。但它给出了表的所有记录。中间运算符不起作用。

Select * From Test
Where strftime('%d-%m-%Y',Date) Between '01-06-2012' And '30-06-2012'

我该如何解决这个问题?

【问题讨论】:

    标签: sqlite between


    【解决方案1】:

    试试这个,

    Select * From Test
    Where strftime('%Y%m%d',Date) Between '20120601' And '20120630'
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2010-12-24
      • 1970-01-01
      • 1970-01-01
      • 2011-05-24
      • 2015-07-25
      相关资源
      最近更新 更多