从时间戳中提取时间部分

Extract time portion out of Timestamp

我正在使用 Azure Application insights 并且只想从时间戳中提取时间部分。

例如:

   Input : "2017-01-23T20:00:00.2804261Z"; //This is a Timestamp data type
   Output : 20:00:00.2804261Z

您可以从现有时间戳中减去天以仅保留其中的 "time" 部分:

QueryHere
| extend date_output = floor(timestamp, 1d)
| extend time_output = timestamp - date_output 

输出类似于

Timestamp: "2017-01-23T20:00:00.2804261Z"
date_output: "2017-01-23T00:00:00.0000000Z"
time_output: "20:00:00.2804261"