0

下面 Query does not return result 给出错误消息 - 不能在 DateTime 和 StringBuffer 之间执行算术表达式

我该如何解决这个问题

| extend Time=format_datetime(Testtime,'yyyy-MM-dd h:m:s.fffffff') 
| facet by Time,Status,ID
| extend minutes = (now() - Time)/60
| project minutes, ID
| limit 1```
4

2 回答 2

2

Time是类型的string,并且now()是类型的datetime

  • now() - Time不支持该操作,如错误消息所示: Arithmetic expression cannot be executed between DateTime and StringBuffer

看来Testtime 类型datetime

  • 你打算now() - Testtime改用吗?
于 2021-10-20T15:19:09.687 回答
1

facet 运算符返回多个表,因此它不能被另一个运算符跟随。

于 2021-10-20T06:41:00.557 回答