Arrayformula无法识别单元格中的日期

问题描述 投票:1回答:1

enter image description here

我正在使用应用程序脚本函数将“last_contacted”单元格从“PENDING”更新为时间戳,使用的函数包含:

function updateRow(singleRowJson,headerRow,columnToUpdate,value ) 


  var cell = sheet.getRange(absoluteRow, columnNumber+1); // here cell is C2
  cell.setValue(value);

我传入:

 updateRow(pendingRow,'3','last_contacted',new Date() ) 

在其他地方,这似乎工作正常。

现在我希望有一个日常跟踪器'天以来',它跟踪隔壁时间戳以来的日子。

我有以下数组公式:

=ARRAYFORMULA(if(ISDATE(V4:V),DATEDIF(V4:V,TODAY(),"D"),"no")) 

在U4。假设今天是12/10,你可以看到结果。我怎样才能使这个工作?

编辑:

enter image description here

google-apps-script google-sheets
1个回答
1
投票

我有另一种选择:

=ArrayFormula(if(Today()-V4:V=today(),"no",Today()-V4:V))
© www.soinside.com 2019 - 2024. All rights reserved.