Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

epoch time difference between first and last.

$
0
0
Hello All, I am trying to find the difference between first time and last time in epoch time. and i want the difference epoch time to be in human readable . for example.: the difference should tell me x amount days or hours. what i have so far which let converts it in a readable format. | eval firstTime=strftime(firstTime, "%Y-%m-%d %H:%M:%S") | eval lastTime=strftime(lastTime, "%Y-%m-%d %H:%M:%S") what i need is the time difference to tell me x amount of days or either hours. I have tried these below but it completely throw away the difference time. | eval diff_hours = round((lastTime-firstTime)/360, 2) | eval firstTime=strftime(firstTime, "%Y-%m-%d %H:%M:%S") | eval lastTime=strftime(lastTime, "%Y-%m-%d %H:%M:%S") | eval new=(lastTime-firstTime) | eval DIFF=(lastTime+new) | eval firstTime=strftime(firstTime, "%Y-%m-%d %H:%M:%S") | eval lastTime=strftime(lastTime, "%Y-%m-%d %H:%M:%S") | eval DIFF=strftime(DIFF, "%Y-%m-%d %H:%M:%S") Thanks much guys

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>