<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Can we pull system time in 'If' Condition in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Can-we-pull-system-time-in-If-Condition/m-p/106037#M27574</link>
    <description>&lt;P&gt;&lt;CODE&gt;now()&lt;/CODE&gt; should be what you're looking for I think?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval checkstatus=if(isnull(status), "Program has not started at " . now(), "OK")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This gives you the epoch value which might not be what you want, for something more humanly readable you could do&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval checkstatus=if(isnull(status), "Program has not started at " . strftime(now(),"%+"), "OK")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 25 Apr 2013 11:54:44 GMT</pubDate>
    <dc:creator>Ayn</dc:creator>
    <dc:date>2013-04-25T11:54:44Z</dc:date>
    <item>
      <title>Can we pull system time in 'If' Condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-pull-system-time-in-If-Condition/m-p/106035#M27572</link>
      <description>&lt;P&gt;I have an alert created where I need to display current system time. There is an If condition in alert which looks something like below.&lt;/P&gt;

&lt;P&gt;eval checkstatus=if(isnull(status), "Program has not started at @Current System Time@", "OK")&lt;/P&gt;

&lt;P&gt;@Current System Time@ is where i want to have my system time displayed. &lt;/P&gt;

&lt;P&gt;Is there a way this can be achieved?&lt;/P&gt;</description>
      <pubDate>Thu, 25 Apr 2013 10:52:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-pull-system-time-in-If-Condition/m-p/106035#M27572</guid>
      <dc:creator>amithhegde</dc:creator>
      <dc:date>2013-04-25T10:52:57Z</dc:date>
    </item>
    <item>
      <title>Re: Can we pull system time in 'If' Condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-pull-system-time-in-If-Condition/m-p/106036#M27573</link>
      <description>&lt;P&gt;You can do this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval checkstatus=if(isnull(status), "Program has not started at ".strftime(now(), "%F %T"), "OK")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Apr 2013 11:53:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-pull-system-time-in-If-Condition/m-p/106036#M27573</guid>
      <dc:creator>martin_mueller</dc:creator>
      <dc:date>2013-04-25T11:53:56Z</dc:date>
    </item>
    <item>
      <title>Re: Can we pull system time in 'If' Condition</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Can-we-pull-system-time-in-If-Condition/m-p/106037#M27574</link>
      <description>&lt;P&gt;&lt;CODE&gt;now()&lt;/CODE&gt; should be what you're looking for I think?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval checkstatus=if(isnull(status), "Program has not started at " . now(), "OK")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This gives you the epoch value which might not be what you want, for something more humanly readable you could do&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval checkstatus=if(isnull(status), "Program has not started at " . strftime(now(),"%+"), "OK")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Apr 2013 11:54:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Can-we-pull-system-time-in-If-Condition/m-p/106037#M27574</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2013-04-25T11:54:44Z</dc:date>
    </item>
  </channel>
</rss>

