Azure Application Insights: How to format dates (and numbers)

╄→гoц情女王★ 提交于 2019-12-06 12:06:06

a) You can project after summarize to change the column format, column name or column order.

b) You can format the result of bin.

A bit ugly, but string parsing can do the trick here:

requests
| project timestamp, client_IP 
| where timestamp >= now() -  30d  and timestamp <= now() + 1d
| summarize  uniqueUsers = dcount(client_IP) by usdate = bin(timestamp - 8h,1d)
| parse tostring(usdate) with year "-" shortDate "T" *
| project shortDate, uniqueUsers** 
| order by shortDate desc

The solution lies in the parse line - taking only the month and day parts of the date

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!