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

Time Conversion Issue with now(), 0, last 24 hours, since, etc.

$
0
0
Hello, I'm having a time conversion issue with any earliest or latest time that is not in epoch. Here is my XML code to convert time from epoch to the date/time format I need.strftime($form.Selected_Time_Range.earliest$,"%c")strftime($form.Selected_Time_Range.latest$,"%c") I'm figuring to use a case statement in an eval (unless there is a better way) to check if the earliest or latest is not in epoch time. However, I am having difficulty figuring out the code for a case within an eval within XML. In pseudo code. If earliest = 0 OR earliest contains letters, than if 0 "Tue Dec 31, 1969 -- 7:00 PM", than if 0d@d, etc..... ????? else run my conversion code If latest = now() OR latest contains letters, than if now() ?????, than if 0d@d, etc..... ????? else run my conversion code My only other options are to train the users to NOT enter anything other than an actual date/time range. Or, force that by limiting the options in the time picker. Neither of these is appealing. I will continue to check the Answers for an.....answer. Thanks and God bless, Genesius

Viewing all articles
Browse latest Browse all 47296

Trending Articles



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