<?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: _time from filename using Eval in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/time-from-filename-using-Eval/m-p/147119#M41123</link>
    <description>&lt;P&gt;&lt;DEFINE name="_masheddate3" extract="year, month, day"&gt;&lt;BR /&gt;
&lt;TEXT&gt;&amp;lt;![CDATA[source::.&lt;EM&gt;?\ABC\d{4}\d{2}\d{2}.&lt;/EM&gt;.csv]]&amp;gt;&lt;/TEXT&gt;&lt;BR /&gt;
&lt;/DEFINE&gt;&lt;BR /&gt;
&lt;DATEPATTERNS&gt;&lt;BR /&gt;
&lt;USE name="_masheddate3"&gt;&lt;/USE&gt;&lt;BR /&gt;
&lt;/DATEPATTERNS&gt;&lt;/P&gt;

&lt;P&gt;[host::DateFormat2]&lt;BR /&gt;
DATETIME_CONFIG =/etc/datetime.xml&lt;BR /&gt;
SHOULD_LINEMERGE = FALSE&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 16:30:09 GMT</pubDate>
    <dc:creator>SplunkBaby</dc:creator>
    <dc:date>2020-09-28T16:30:09Z</dc:date>
    <item>
      <title>_time from filename using Eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-from-filename-using-Eval/m-p/147115#M41119</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;My file name is like ABC20140321.csv&lt;BR /&gt;
I want splunk to read _time value from this file name.&lt;BR /&gt;
I tried to edit datetime.xml and props.config and it doesn't work out for me.&lt;BR /&gt;
How can I achieve this using  EVAL in props.config&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 11:07:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-from-filename-using-Eval/m-p/147115#M41119</guid>
      <dc:creator>SplunkBaby</dc:creator>
      <dc:date>2014-04-30T11:07:19Z</dc:date>
    </item>
    <item>
      <title>Re: _time from filename using Eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-from-filename-using-Eval/m-p/147116#M41120</link>
      <description>&lt;P&gt;Have you read &lt;A href="http://blogs.splunk.com/2009/12/02/configure-splunk-to-pull-a-date-out-of-a-non-standard-filename/"&gt;http://blogs.splunk.com/2009/12/02/configure-splunk-to-pull-a-date-out-of-a-non-standard-filename/&lt;/A&gt;?&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 11:51:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-from-filename-using-Eval/m-p/147116#M41120</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-04-30T11:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: _time from filename using Eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-from-filename-using-Eval/m-p/147117#M41121</link>
      <description>&lt;P&gt;Yes ,unfortunately its not working for me.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 11:59:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-from-filename-using-Eval/m-p/147117#M41121</guid>
      <dc:creator>SplunkBaby</dc:creator>
      <dc:date>2014-04-30T11:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: _time from filename using Eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-from-filename-using-Eval/m-p/147118#M41122</link>
      <description>&lt;P&gt;Please post your datetime.xml file and the relevant stanza from your props.conf file.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Apr 2014 12:04:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-from-filename-using-Eval/m-p/147118#M41122</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-04-30T12:04:19Z</dc:date>
    </item>
    <item>
      <title>Re: _time from filename using Eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-from-filename-using-Eval/m-p/147119#M41123</link>
      <description>&lt;P&gt;&lt;DEFINE name="_masheddate3" extract="year, month, day"&gt;&lt;BR /&gt;
&lt;TEXT&gt;&amp;lt;![CDATA[source::.&lt;EM&gt;?\ABC\d{4}\d{2}\d{2}.&lt;/EM&gt;.csv]]&amp;gt;&lt;/TEXT&gt;&lt;BR /&gt;
&lt;/DEFINE&gt;&lt;BR /&gt;
&lt;DATEPATTERNS&gt;&lt;BR /&gt;
&lt;USE name="_masheddate3"&gt;&lt;/USE&gt;&lt;BR /&gt;
&lt;/DATEPATTERNS&gt;&lt;/P&gt;

&lt;P&gt;[host::DateFormat2]&lt;BR /&gt;
DATETIME_CONFIG =/etc/datetime.xml&lt;BR /&gt;
SHOULD_LINEMERGE = FALSE&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:30:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-from-filename-using-Eval/m-p/147119#M41123</guid>
      <dc:creator>SplunkBaby</dc:creator>
      <dc:date>2020-09-28T16:30:09Z</dc:date>
    </item>
    <item>
      <title>Re: _time from filename using Eval</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-from-filename-using-Eval/m-p/147120#M41124</link>
      <description>&lt;P&gt;Is your datetime.xml file really in $SPLUNK_HOME/etc or $SPLUNK_HOME/etc/system/local?&lt;BR /&gt;
Perhaps some escape characters got dropped from your comment, but your regex doesn't look right.  This works in RegExr:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;\ABC(\d{4})(\d{2})(\d{2})\.csv
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:30:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-from-filename-using-Eval/m-p/147120#M41124</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-09-28T16:30:11Z</dc:date>
    </item>
  </channel>
</rss>

