Query Details

Dayof Week

Query

//Simple KQL query to show day of week when a record was generated.

// Results Legend:
// Sunday = 0.00:00:00
// Monday = 1.00:00:00
// Tuesday = 2.00:00:00
// Wednesday = 3.00:00:00
// Thursday 4.00:00:00
// Friday = 5.00:00:00
// Saturday = 6.00:00:00


SigninLogs
| project TimeGenerated, Day_of_Week = dayofweek(TimeGenerated)
| take 10

Explanation

This query retrieves the TimeGenerated field from the SigninLogs table and calculates the day of the week for each record. The day of the week is represented as a number, with Sunday being 0, Monday being 1, and so on. The query then displays the TimeGenerated and Day_of_Week fields for the first 10 records.

Details

Rod Trent profile picture

Rod Trent

Released: August 23, 2022

Tables

SigninLogs

Keywords

SigninLogs,TimeGenerated,Day_of_Week

Operators

SigninLogsprojectTimeGeneratedDay_of_Weekdayofweektake

Actions