Try this
| eval finish_time_epoch = strptime(FINISH_TIME, "%Y-%m-%d %H:%M:%S")
| eval start_time_epoch = strptime(START_TIME, "%Y-%m-%d %H:%M:%S")
| eval duration = finish_time_epoch - start_time_epoch
| stats sum(duration) as duration by finish_time_epoch
| sort - finish_time_epoch
| eval TimeDate=strftime(finish_time_epoch, "%Y-%m-%d %H:%M:%S")
| eval duration=tostring(duration,"duration")
| table duration TimeDate
Were the durations originally in seconds as this would make it easier
| stats sum(duration_in_seconds) as duration_in_seconds by TimeDate
| fieldformat duration_in_seconds=tostring(duration_in_seconds,"duration")
No
The initial query
| eval finish_time_epoch = strptime(FINISH_TIME, "%Y-%m-%d %H:%M:%S")
| eval start_time_epoch = strptime(START_TIME, "%Y-%m-%d %H:%M:%S")
| eval duration = tostring((finish_time_epoch - start_time_epoch), "duration")
| rex field="duration" mode=sed "s/\..*$//"
| sort -FINISH_TIME
| table duration, timeDate
Try this
| eval finish_time_epoch = strptime(FINISH_TIME, "%Y-%m-%d %H:%M:%S")
| eval start_time_epoch = strptime(START_TIME, "%Y-%m-%d %H:%M:%S")
| eval duration = finish_time_epoch - start_time_epoch
| stats sum(duration) as duration by finish_time_epoch
| sort - finish_time_epoch
| eval TimeDate=strftime(finish_time_epoch, "%Y-%m-%d %H:%M:%S")
| eval duration=tostring(duration,"duration")
| table duration TimeDate