I am trying to calculate difference in my two custom date time/fields and get output results in milliseconds.
I tried the following query, but it didn't yield the expected result.
SourceTimestamp format:2019-01-23 11:37:39:584
ProcessTimestamp Format:2019-01-23 11:37:39:756
Actual Result with below query: 00:00:00.000000
Expected Result: 172 ms
search..| eval startTime=strptime(SourceTimestamp,"%Y-%m-%d %H:%M:%S.%Q") | eval endTime=strptime(ProcessTimestamp,"%Y-%m-%d %H:%M:%S.%Q") | eval TimeDiff=tostring((endTime-startTime),"duration") | table SourceTimestamp ProcessTimestamp TimeDiff
... View more