you can convert your _time like this | eval TimeOfTheday=strftime(_time,"%R%p") and then again use the case of if conditions to put the time(hour) in the right buckets
Or You could first create epoch time for 6pm and 7am like this | eval StartTime=strptime("18:00","%H:%M") and | eval StartTime=strptime("07:00","%H:%M") and then apply if else :
index=smth EventCode=4625 Account_Domain="*"
| fillnull value=NULL
| eval Account_Name = mvindex(Account_Name,1)
| eval LoginType=case(Logon_Type=3,"RPC (not RDP)",Logon_Type=4,"Batch",Logon_Type=5,"Service",Logon_Type=7,"Screen Unlock/Session Resume",Logon_Type=10,"Remote Desktop",Logon_Type=11,"Cached",Logon_Type=9,"New Credentials")
| stats count by host, Account_Name, LoginType, _time, Account_Domain
| sort -count
| eval StartTime=strptime("18:00","%H:%M")
| eval EndTime=strptime("22:00","%H:%M") | eval Buckets=if(_time>StartTime AND _time<EndTime,"6PM to 7 AM",EverythingElse)
... View more