<?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: How to extract date and time in Splunk? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-in-Splunk/m-p/197587#M57091</link>
    <description>&lt;P&gt;As long as you keep the different sources in different input files or streams, you should be fine. But I think you will make yourself nuts if you mix more than one timestamp format in the same input.&lt;/P&gt;

&lt;P&gt;For each input where you want to specify the time format, you will need an entry in &lt;CODE&gt;props.conf&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/path/to/your/source/file.ext]
TIME_FORMAT=%m/%d/%y
MAX_TIMESTAMP_LOOKAHEAD = 50
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This &lt;CODE&gt;props.conf&lt;/CODE&gt; belongs on the indexer(s) that parse the data, not on the forwarders.&lt;/P&gt;

&lt;P&gt;The &lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD&lt;/CODE&gt; is not required, but it is a good idea. I have set it so that it only examines the first 50 characters of the event for the timestamp.&lt;/P&gt;

&lt;P&gt;More information here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/HowSplunkextractstimestamps"&gt;How Splunk extracts timestamps&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 12 Jun 2014 21:06:53 GMT</pubDate>
    <dc:creator>lguinn2</dc:creator>
    <dc:date>2014-06-12T21:06:53Z</dc:date>
    <item>
      <title>How to extract date and time in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-in-Splunk/m-p/197586#M57090</link>
      <description>&lt;P&gt;I am having problems getting splunk to recognize date/time. The txt file I am extracting data from has multiple sources. Each source can have a different date/time format. Right now we are using two different types of events but will add new ones in the future. One of the two formats only includes a date. The other format has a date and a time but are not grouped together. See example below. &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;ODEPR  ;04/28/14 ;1D81;CHM_retrieveIntmdDtlMDMPrntInqry ;ValidateResponse ;0.000 ;0.001 ;10704 ;PRO1BAT1 ;ValidateNode ;MQS2BRK
NODENP  ;06/12/14 ;1B90;0:22 ;PYM_entityCheckPatriotAct43A_MF ;FilterEndOfBatch ;0.000 ;0.000 ;9 ;TST1TRN3 ;FilterNode ;MQS9BRK
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Any help you can provide would be greatly appreciated.&lt;/P&gt;

&lt;P&gt;Thank you,&lt;BR /&gt;
Don&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2014 19:36:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-in-Splunk/m-p/197586#M57090</guid>
      <dc:creator>DonDandrea</dc:creator>
      <dc:date>2014-06-12T19:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract date and time in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-in-Splunk/m-p/197587#M57091</link>
      <description>&lt;P&gt;As long as you keep the different sources in different input files or streams, you should be fine. But I think you will make yourself nuts if you mix more than one timestamp format in the same input.&lt;/P&gt;

&lt;P&gt;For each input where you want to specify the time format, you will need an entry in &lt;CODE&gt;props.conf&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[source::/path/to/your/source/file.ext]
TIME_FORMAT=%m/%d/%y
MAX_TIMESTAMP_LOOKAHEAD = 50
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This &lt;CODE&gt;props.conf&lt;/CODE&gt; belongs on the indexer(s) that parse the data, not on the forwarders.&lt;/P&gt;

&lt;P&gt;The &lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD&lt;/CODE&gt; is not required, but it is a good idea. I have set it so that it only examines the first 50 characters of the event for the timestamp.&lt;/P&gt;

&lt;P&gt;More information here: &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/Data/HowSplunkextractstimestamps"&gt;How Splunk extracts timestamps&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2014 21:06:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-in-Splunk/m-p/197587#M57091</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-06-12T21:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract date and time in Splunk?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-in-Splunk/m-p/197588#M57092</link>
      <description>&lt;P&gt;I tried this and it worked for the entries that have a time. The entried that do not have time are indexed with the date the file was indexed. To be quite honest I don't care about the time. The entries are once a day. The date is the important piece.&lt;/P&gt;</description>
      <pubDate>Fri, 13 Jun 2014 19:19:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-in-Splunk/m-p/197588#M57092</guid>
      <dc:creator>DonDandrea</dc:creator>
      <dc:date>2014-06-13T19:19:32Z</dc:date>
    </item>
  </channel>
</rss>

