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

Why am I unable to find the time difference between two dates with my current eval statements?

$
0
0
Hi all. I have one field called **date1** with a timestamp like this: > 5/7/16 16:35 I need the time difference (just for the date) in days against `now()`. I am using this expression: ... | eval onlydate=strftime(strptime(date1,"%-m/%d/%y %H:%M"),"%-m/%-d/%y") | eval nowstring=strftime(now(), "%-m/%-d/%y") And works well, but I can't calculate the time difference between **nowstring** and **onlydate** and both are in the same format. Any clue? I tried using ... | eval difference=(nowstring - onlydate) And didn't work. Thanks!

Viewing all articles
Browse latest Browse all 47296

Trending Articles



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