There are two ways to do that (perhaps others will have more), but both require the timestamp be converted to epoch time first.
... | eval ts=strptime(timestamp, "%Y-%m-%dT%H:%M:%S.%3N%Z") | eval newts=ts-300 | ...
... | eval ts=strptime(timestamp, "%Y-%m-%dT%H:%M:%S.%3N%Z") | eval newts=relative_time(ts, -5m) | ...
There are two ways to do that (perhaps others will have more), but both require the timestamp be converted to epoch time first.
... | eval ts=strptime(timestamp, "%Y-%m-%dT%H:%M:%S.%3N%Z") | eval newts=ts-300 | ...
... | eval ts=strptime(timestamp, "%Y-%m-%dT%H:%M:%S.%3N%Z") | eval newts=relative_time(ts, -5m) | ...
Hi, how can I convert this format of Time?
start time: 2015-12-13T23:55:02+00:00
end time : 2015-12-15T23:55:02+00:00
And then I need to get the time taken from start to end TMA = (Start time - End Time) | table TMA
Can you help me out?
Thanks.
Please post a new question.
Your answer worked, but it dawned on me that I already had the value in epoch.. so I just did this
| eval ts=(_time - (5 * 60)) | .....