gpt4 book ai didi

azure-application-insights - Application Insights,将时差转换为毫秒

转载 作者:行者123 更新时间:2023-12-04 02:04:34 27 4
gpt4 key购买 nike

如何在 Azure Application Insights 中将时差转换为毫秒

let startTime = todatetime('2017-05-15T17:02:23.7148691Z');
let endTime = todatetime('2017-05-15T17:02:25.5430172Z');
let timeDifference = endTime-startTime;
requests
| project timeDifference
| limit 1

以上查询输出

00:00:01.8281481

我想以毫秒为单位显示

例如:1828

最佳答案

您可以将您的时间跨度除以另一个时间跨度。因此,要获取毫秒数,您可以执行以下操作:

let startTime = todatetime('2017-05-15T17:02:23.7148691Z');
let endTime = todatetime('2017-05-15T17:02:25.5430172Z');
let timeDifference = endTime-startTime;
// get total milliseconds
requests
| extend timeDifferenceMilliseconds = timeDifference / time(1ms)
| project timeDifferenceMilliseconds
| limit 1

可以在此处找到有关日期和时间表达式的更多信息:https://learn.microsoft.com/en-us/azure/application-insights/app-insights-analytics-reference#date-and-time-expressions

关于azure-application-insights - Application Insights,将时差转换为毫秒,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44421975/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com