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

Help with a search to print date fields

$
0
0
need to print dates from Thanksgiving onward for the rest of the week until Monday index="test" source="test" date=* mon=* year=* (STATDATE>=2016-11-22 AND STATDATE<=2016-11-30) SITE=USA | eval day_c = strftime(_time,"%Y-%m-%d") | eval enddate= year+"-11-29"| eval startdate= year+"-11-24" | eval DiffInSecs = strptime(enddate, "%Y-%m-%d")-strptime(startdate, "%Y-%m-%d") | eval td = strftime(DiffInSecs, "%Y-%m-%d %A") | table day_c td Expected Results: 2016-11-24 2016-11-24 Thursday Actual results: 2016-11-29 1970-01-05 Monday 2016-11-28 1970-01-05 Monday 2016-11-27 1970-01-05 Monday 2016-11-26 1970-01-05 Monday 2016-11-25 1970-01-05 Monday 2016-11-24 1970-01-05 Monday 2016-11-23 1970-01-05 Monday 2016-11-22 1970-01-05 Monday

Viewing all articles
Browse latest Browse all 47296

Trending Articles



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