It would help to know what you've tried already so we don't suggest something that doesn't work. A thing to remember is Splunk can't compare timestamps in text form - they must be converted to epoch (integer) form, first. | makeresults format=csv data="Employee, Time, Country
John Doe, 2023-11-15T20:05:31.000+00:00, France
John Doe, 2023-11-18T10:00:31.000+00:00, France
John Doe, 2023-11-20T10:05:31.000+00:00, United States
John Doe, 2023-11-25T20:05:31.000+00:00, United States"
``` Above creates demo data. Delete IRL ```
``` Convert Time to epoch ```
| eval eTime=strptime(Time, "%Y-%m-%dT%H:%M:%S.%3N%:z")
``` Find the lowest and highest time for each employee/country pair ```
| stats min(eTime) as start, max(eTime) as end by Employee,Country
``` Calculate the duration in days. Add "d" suffix for display ```
| eval duration=round((end-start)/86400,0) . "d"
| table Employee duration Country
... View more