<?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: fill an occasional Null field with the current time in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/fill-an-occasional-Null-field-with-the-current-time/m-p/339784#M92972</link>
    <description>&lt;P&gt;Thats great, thanks.&lt;/P&gt;</description>
    <pubDate>Fri, 21 Apr 2017 16:01:14 GMT</pubDate>
    <dc:creator>jacqu3sy</dc:creator>
    <dc:date>2017-04-21T16:01:14Z</dc:date>
    <item>
      <title>fill an occasional Null field with the current time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/fill-an-occasional-Null-field-with-the-current-time/m-p/339778#M92966</link>
      <description>&lt;P&gt;I have a search outputting results which includes a field for 'closedtime'. On occasion however this field will be blank. When this occurs, how do I fill this field with the current time?&lt;/P&gt;

&lt;P&gt;Appreciate any help!&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2017 12:06:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/fill-an-occasional-Null-field-with-the-current-time/m-p/339778#M92966</guid>
      <dc:creator>jacqu3sy</dc:creator>
      <dc:date>2017-04-20T12:06:16Z</dc:date>
    </item>
    <item>
      <title>Re: fill an occasional Null field with the current time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/fill-an-occasional-Null-field-with-the-current-time/m-p/339779#M92967</link>
      <description>&lt;P&gt;Try this -&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval closedtime=if(isnull(closedtime) OR len(closedtime)==0,strftime(now(),"%F %T %Z"),closedtime)
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 20 Apr 2017 12:59:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/fill-an-occasional-Null-field-with-the-current-time/m-p/339779#M92967</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2017-04-20T12:59:24Z</dc:date>
    </item>
    <item>
      <title>Re: fill an occasional Null field with the current time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/fill-an-occasional-Null-field-with-the-current-time/m-p/339780#M92968</link>
      <description>&lt;P&gt;Seems to work, would you mind explaining the logic behind it? Not sure I fully understand how its working!?&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2017 15:06:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/fill-an-occasional-Null-field-with-the-current-time/m-p/339780#M92968</guid>
      <dc:creator>jacqu3sy</dc:creator>
      <dc:date>2017-04-20T15:06:07Z</dc:date>
    </item>
    <item>
      <title>Re: fill an occasional Null field with the current time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/fill-an-occasional-Null-field-with-the-current-time/m-p/339781#M92969</link>
      <description>&lt;P&gt;The if condition check if the value of the field &lt;CODE&gt;closedtime&lt;/CODE&gt; is either null OR blank (length is 0), if it is, use the current time given in epoch format by function &lt;CODE&gt;now()&lt;/CODE&gt; and format it to string timestamp using strftime function. If it's neither null nor blank, use the value of field itself.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2017 15:40:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/fill-an-occasional-Null-field-with-the-current-time/m-p/339781#M92969</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-04-20T15:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: fill an occasional Null field with the current time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/fill-an-occasional-Null-field-with-the-current-time/m-p/339782#M92970</link>
      <description>&lt;P&gt;Thanks @somesoni!&lt;/P&gt;

&lt;P&gt;@jacqu3sy -  You can modify the parameters to the strftime function to have the time format as you same as the closedtime values - &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Commontimeformatvariables"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Commontimeformatvariables&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 05:08:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/fill-an-occasional-Null-field-with-the-current-time/m-p/339782#M92970</guid>
      <dc:creator>dineshraj9</dc:creator>
      <dc:date>2017-04-21T05:08:18Z</dc:date>
    </item>
    <item>
      <title>Re: fill an occasional Null field with the current time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/fill-an-occasional-Null-field-with-the-current-time/m-p/339783#M92971</link>
      <description>&lt;P&gt;Great explanation, makes perfect sense. Thanks both.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 16:00:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/fill-an-occasional-Null-field-with-the-current-time/m-p/339783#M92971</guid>
      <dc:creator>jacqu3sy</dc:creator>
      <dc:date>2017-04-21T16:00:57Z</dc:date>
    </item>
    <item>
      <title>Re: fill an occasional Null field with the current time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/fill-an-occasional-Null-field-with-the-current-time/m-p/339784#M92972</link>
      <description>&lt;P&gt;Thats great, thanks.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 16:01:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/fill-an-occasional-Null-field-with-the-current-time/m-p/339784#M92972</guid>
      <dc:creator>jacqu3sy</dc:creator>
      <dc:date>2017-04-21T16:01:14Z</dc:date>
    </item>
  </channel>
</rss>

