Google表格:查询date> now()不返回任何内容的地方 [英] Google Sheets: Query where date>now() returns nothing
本文介绍了Google表格:查询date> now()不返回任何内容的地方的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用Google表格查询功能从其他工作表中获取数据.此查询可完美匹配两个文本字段(其中A ='& A5&"'')
I am using Google Sheets query function to bring data from a different sheet. This query works perfectly, matching two text fields (Where A='"&A5&"')
=query('Modifications'!$A$3:$I,"Select E,F,G,H,I Where A='"&A5&"'order by E desc limit 1")
但是,当我尝试将AND语句作为Where子句的一部分添加以按今天的日期(now())进行过滤时,查询将不会返回任何内容:
However, when I try to add an AND statement as part of the Where clause to filter by today's date ( now() ), the query returns nothing:
=query('Modifications'!$A$3:$I,"Select E,F,G,H,I Where A='"&A5&"' AND F>now() order by E desc limit 1")
我想念什么?
推荐答案
尝试如下:
=QUERY('Modifications'!$A$3:$I,
"select E,F,G,H,I
where A = '"&A5&"'
and F > date '"&TEXT(TODAY(), "yyyy-mm-dd")&"'
order by E desc
limit 1", 0)
这篇关于Google表格:查询date> now()不返回任何内容的地方的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文