将值添加到查询结果的一列

时间:2019-05-30 23:39:06

标签: google-sheets array-formulas google-sheets-formula google-sheets-query

我在电子表格中有一个查询:

=IFERROR(QUERY(swgohEventsCal!$A$2:$D,"SELECT A,B,C where A contains 'TB' and C >= date '"&TEXT(TODAY(),"yyyy-MM-dd")&"' order by B limit 4", 0),"Nothing Scheduled!")

B列显示日期和时间,但时间默认为12 AM。我想做的是增加24小时或一天的时间。

因此,当结果为5/26/2019 0:00:00时,我希望它显示5/27/2019 0:00:00

here's my spreadsheet for reference

1 个答案:

答案 0 :(得分:1)

=ARRAYFORMULA(IFERROR(QUERY(
 {swgohEventsCal!$A$2:$A,swgohEventsCal!$B$2:$B+1,swgohEventsCal!$C$2:$D},
 "select Col1,Col2,Col3 
  where Col1 contains 'TB' 
    and Col3 >= date '"&TEXT(TODAY(), "yyyy-MM-dd")&"' 
  order by Col2 
  limit 4", 0), "Nothing Scheduled!"))

0