<?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 If I have a log file with timestamps in it, but no date, is there a way to extract date from the log file name and assign it? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-log-file-with-timestamps-in-it-but-no-date-is-there/m-p/176186#M50592</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a logfile that has timestamps in it, but no date.  The name of the logfile has a date - is there anyway to assign the date from the file?  I know it would automatically post today's date, but sometimes these files show up late, so I'd like to extract it.&lt;/P&gt;

&lt;P&gt;Format:&lt;/P&gt;

&lt;P&gt;ORS_RTP_Node1_BK.20150107_133125_493.log&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 18:35:34 GMT</pubDate>
    <dc:creator>a212830</dc:creator>
    <dc:date>2020-09-28T18:35:34Z</dc:date>
    <item>
      <title>If I have a log file with timestamps in it, but no date, is there a way to extract date from the log file name and assign it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-log-file-with-timestamps-in-it-but-no-date-is-there/m-p/176186#M50592</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;

&lt;P&gt;I have a logfile that has timestamps in it, but no date.  The name of the logfile has a date - is there anyway to assign the date from the file?  I know it would automatically post today's date, but sometimes these files show up late, so I'd like to extract it.&lt;/P&gt;

&lt;P&gt;Format:&lt;/P&gt;

&lt;P&gt;ORS_RTP_Node1_BK.20150107_133125_493.log&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 18:35:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-log-file-with-timestamps-in-it-but-no-date-is-there/m-p/176186#M50592</guid>
      <dc:creator>a212830</dc:creator>
      <dc:date>2020-09-28T18:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: If I have a log file with timestamps in it, but no date, is there a way to extract date from the log file name and assign it?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-log-file-with-timestamps-in-it-but-no-date-is-there/m-p/176187#M50593</link>
      <description>&lt;P&gt;Yes, it can be done.&lt;/P&gt;

&lt;P&gt;Check out the discussion and documentation regarding using datetime.xml to do this:&lt;/P&gt;

&lt;P&gt;&lt;A href="http://answers.splunk.com/answers/12015/setting-date-on-event-based-on-filename.html"&gt;http://answers.splunk.com/answers/12015/setting-date-on-event-based-on-filename.html&lt;/A&gt;&lt;BR /&gt;
(there is some bad formatting on the config code but you should get the idea)&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.1/Data/Configuretimestamprecognition"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.1/Data/Configuretimestamprecognition&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Jan 2015 19:33:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/If-I-have-a-log-file-with-timestamps-in-it-but-no-date-is-there/m-p/176187#M50593</guid>
      <dc:creator>chanfoli</dc:creator>
      <dc:date>2015-01-08T19:33:32Z</dc:date>
    </item>
  </channel>
</rss>

