<?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: Tab Delimited Date Time Not Getting Correct Date/Time in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113356#M23723</link>
    <description>&lt;P&gt;[^\w*\t\w*\t\w*\t\w*\t] &lt;BR /&gt;
unless anyone can tell me different seems to have done the trick. Thanks for your help in getting me to the right answer!&lt;/P&gt;</description>
    <pubDate>Mon, 31 Mar 2014 19:41:10 GMT</pubDate>
    <dc:creator>aelliott</dc:creator>
    <dc:date>2014-03-31T19:41:10Z</dc:date>
    <item>
      <title>Tab Delimited Date Time Not Getting Correct Date/Time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113350#M23717</link>
      <description>&lt;P&gt;I have a log file that is tab delimited. It has a field called "date" and a field called "time" next to each other.&lt;BR /&gt;
This is the format of the fields:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2013-10-24  11:40:23
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The issue I'm having is that sometimes another field such as "8.1.5"(just some random value) that does not match the TIME_FORMAT shows up in the user agent string and somehow takes control over the date and time fields, thus producing wrong date/time on those records.(in this case August 1st 2005)&lt;/P&gt;

&lt;P&gt;I have tried &lt;CODE&gt;TIME_PREFIX=[\t]&lt;/CODE&gt; and leaving off the TIME_PREFIX, no change.&lt;/P&gt;

&lt;P&gt;I have tried:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_FORMAT=%Y-%m-%d%n%H:%M:%S
TIME_FORMAT=%Y-%m-%d%t%H:%M:%S
TIME_FORMAT=%Y-%m-%d&amp;lt;tab&amp;gt;%H:%M:%S
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here is my props.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;SHOULD_LINEMERGE=false
TZ=GMT
pulldown_type=true
NO_BINARY_CHECK=1
TIME_PREFIX=[\t]
MAX_TIMESTAMP_LOOKAHEAD=500
TIME_FORMAT=%Y-%m-%d%n%H:%M:%S
REPORT-isawebw3c=isawebw3c
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;transforms.conf:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[isawebw3c]
DELIMS = "\t"
FIELDS="c-ip","cs-username","c-agent","sc-authenticated","date","time","s-svcname","s-computername","cs-referred","r-host","r-ip","r-port","time-taken","cs-bytes","sc-bytes","cs-protocol","cs-transport","s-operation","cs-uri","cs-mime-type","s-object-source","sc-status","s-cache-info","rule","FilterInfo","cs-Network","sc-Network","error-info","action","GMT-Time","AuthenticationServer"
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 31 Mar 2014 18:15:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113350#M23717</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2014-03-31T18:15:47Z</dc:date>
    </item>
    <item>
      <title>Re: Tab Delimited Date Time Not Getting Correct Date/Time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113351#M23718</link>
      <description>&lt;P&gt;Have you considered using REGEX in your transforms.conf?  Something like:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;REGEX=(?&amp;lt;c-ip&amp;gt;[^\t]?)\t(?&amp;lt;cs-username&amp;gt;[^\t]?)\t...\t(?&amp;lt;date&amp;gt;[^\t]&amp;gt;)...
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 31 Mar 2014 19:02:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113351#M23718</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-03-31T19:02:48Z</dc:date>
    </item>
    <item>
      <title>Re: Tab Delimited Date Time Not Getting Correct Date/Time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113352#M23719</link>
      <description>&lt;P&gt;ok so how would that get me the right timestamp? My transform is working just fine.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2014 19:05:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113352#M23719</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2014-03-31T19:05:33Z</dc:date>
    </item>
    <item>
      <title>Re: Tab Delimited Date Time Not Getting Correct Date/Time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113353#M23720</link>
      <description>&lt;P&gt;I suspect the TIME_FORMAT config doesn't understand you have a tab character within your time string.  You also said that other fields sometimes appears in your date and time fields so maybe your transform isn't always working.  Maybe a REGEX will work better or maybe it's Monday and my brain isn't at full steam yet. &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2014 19:14:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113353#M23720</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-03-31T19:14:20Z</dc:date>
    </item>
    <item>
      <title>Re: Tab Delimited Date Time Not Getting Correct Date/Time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113354#M23721</link>
      <description>&lt;P&gt;Oh, the date and time fields parse just fine into the "date" and "time" fields.. the issue is that other fields show up in the _time field.. if they appear before the date/time fields. c-agent sometimes gets random IP's or random dates or random version numbers in it from a user's user agent string. Instead of the Timestamp using the date and time fields with the format I gave it, it grabs those random numbers and converts them into a date.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2014 19:18:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113354#M23721</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2014-03-31T19:18:07Z</dc:date>
    </item>
    <item>
      <title>Re: Tab Delimited Date Time Not Getting Correct Date/Time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113355#M23722</link>
      <description>&lt;P&gt;I think I get it now.  What you need is a MIN_TIMESTAMP_LOOKAHEAD-type of feature where Splunk will look for times x characters into the event.  Until we have one of those, can you make your TIME_PREFIX string more specific?  Maybe "[^\t]\t[^\t]\t[^\t]\t[^\t]\t"?&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:16:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113355#M23722</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-09-28T16:16:52Z</dc:date>
    </item>
    <item>
      <title>Re: Tab Delimited Date Time Not Getting Correct Date/Time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113356#M23723</link>
      <description>&lt;P&gt;[^\w*\t\w*\t\w*\t\w*\t] &lt;BR /&gt;
unless anyone can tell me different seems to have done the trick. Thanks for your help in getting me to the right answer!&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2014 19:41:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113356#M23723</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2014-03-31T19:41:10Z</dc:date>
    </item>
    <item>
      <title>Re: Tab Delimited Date Time Not Getting Correct Date/Time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113357#M23724</link>
      <description>&lt;P&gt;Unfortunately this did not end up working. It still picked up the .. 10.8.5  within the c-agent field which is a mac computer operating system. It seemed to work on import as it was only highlighting the date fields once I put in that regex.&lt;/P&gt;</description>
      <pubDate>Mon, 31 Mar 2014 20:00:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113357#M23724</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2014-03-31T20:00:49Z</dc:date>
    </item>
    <item>
      <title>Re: Tab Delimited Date Time Not Getting Correct Date/Time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113358#M23725</link>
      <description>&lt;P&gt;Have you tried [\S\t\S\t\S\t\S\t]?  I think \w is failing because of non-word characters (like '.') in one or more of your fields.&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2014 12:09:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113358#M23725</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-04-01T12:09:36Z</dc:date>
    </item>
    <item>
      <title>Re: Tab Delimited Date Time Not Getting Correct Date/Time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113359#M23726</link>
      <description>&lt;P&gt;This is very close &lt;BR /&gt;
^\S+\t\S+\t\S+\t\S+\t&lt;BR /&gt;
However, there are spaces within the user agent strings that is the issue. Really it needs to be ^ non-tab, tab, non-tab, tab, non-tab, tab, non-tab, tab&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2014 13:42:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113359#M23726</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2014-04-01T13:42:48Z</dc:date>
    </item>
    <item>
      <title>Re: Tab Delimited Date Time Not Getting Correct Date/Time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113360#M23727</link>
      <description>&lt;P&gt;What you describe should be covered by &lt;CODE&gt;[^\t]+\t[^\t]+\t[^\t]+\t[^\t]+\t&lt;/CODE&gt;.  Can you share some sample data so I can experiment with regex strings?&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2014 13:46:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113360#M23727</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-04-01T13:46:57Z</dc:date>
    </item>
    <item>
      <title>Re: Tab Delimited Date Time Not Getting Correct Date/Time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113361#M23728</link>
      <description>&lt;P&gt;I just came to that answer as well &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; thanks for your help&lt;BR /&gt;
TIME_PREFIX=^[^\t]+\t[^\t]+\t[^\t]+\t[^\t]+\t&lt;/P&gt;

&lt;P&gt;It worked perfectly&lt;/P&gt;</description>
      <pubDate>Tue, 01 Apr 2014 14:05:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Tab-Delimited-Date-Time-Not-Getting-Correct-Date-Time/m-p/113361#M23728</guid>
      <dc:creator>aelliott</dc:creator>
      <dc:date>2014-04-01T14:05:04Z</dc:date>
    </item>
  </channel>
</rss>

