Muster für eine kusto Abfrage

Angepasste kusto query um immer gestern von 15:00 – heute 15:00 anzuzeigen.

let yesterday = now(-1d);
let day = datetime_part("Day", yesterday);
let month = datetime_part("Month", yesterday);
let year = datetime_part("Year", yesterday);
let str_yesterday3pm = strcat(year, "-", month, "-", day, " 15:00:00");
let yesterday_3pm = todatetime(str_yesterday3pm);
let str_today3pm = strcat(year, "-", month, "-", datetime_part("Day", now()), " 15:00:00");
let today_3pm = todatetime(str_today3pm);
customMetrics
| where timestamp > yesterday_3pm and timestamp <= today_3pm
| where name == "corona_entry"
| where value > 999
| extend d = parse_json(customDimensions)
| extend program = d.program
| extend postcode = d.postcode
| extend purpose = d.purpose
| extend legal = d.legal
| extend nace = d.nace
| extend size = d.size
| extend age = d.age
| extend duration = d.duration
| extend customMetric_value = iif(itemType == 'customMetric',value,todouble(''))
| project value, timestamp, program, postcode, purpose, legal, nace, size, age, duration