简体   繁体   English

如何在带有日期条件的 Google 表格中使用查询和导入范围?

[英]How to use the Query and Import Range in Google Sheets with a Date Criteria?

I have two separate workbooks, I would like to bring over the date value found in column E as long as it's not a null value.我有两个单独的工作簿,只要不是 null 值,我想带入 E 列中的日期值。 The formula below brings over the first value found in the range you see below but nothing else and I can't figure out why.下面的公式带来了您在下面看到的范围内找到的第一个值,但没有别的,我不知道为什么。 I should have about 2400 values being brought over.我应该带来大约 2400 个值。

=query({importrange("workbookadress","Sheet1!E2:E3000")},"Where Col1 >='01/01/1900'",1)

What am I missing?我错过了什么?

=query({importrange("workbookadress","Sheet1:E2,E3000")},"Where Col1 >= date '1900-01-01' ",1)

Col1 >= date '1900-01-01' is the notation (yyyy-mm-dd). Col1 >= date '1900-01-01'是符号 (yyyy-mm-dd)。

If you want to get the date from a cell value, then you'd need to use:如果要从单元格值中获取日期,则需要使用:

Col1 >= date 'xxx' where xxx is: Col1 >= date 'xxx'其中 xxx 是:

"&text(Z1,"yyyy-mm-dd")&" where Z1 is your cell. "&text(Z1,"yyyy-mm-dd")&"其中Z1是您的单元格。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM