【问题标题】:Query with datetime check excludes some records带有日期时间检查的查询排除了一些记录
【发布时间】:2019-09-19 12:20:55
【问题描述】:

由于某种原因,我的查询没有考虑这些记录:

50  19/09/2019 15:00:00
60  19/09/2019 17:00:00
70  19/09/2019 18:00:00

是什么原因造成的?否则一切似乎都很好。不包括超过 7 天前的记录。

【问题讨论】:

    标签: date google-sheets google-sheets-formula google-sheets-query google-query-language


    【解决方案1】:
    =QUERY(A:B, 
     "where B >= date     '"&TEXT(TODAY()-7, "yyyy-MM-dd")&"' 
        and B <= datetime '"&TEXT(NOW(),     "yyyy-MM-dd hh:mm:ss")&"'", 0)
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-01-10
      • 1970-01-01
      • 1970-01-01
      • 2012-08-11
      • 1970-01-01
      相关资源
      最近更新 更多