<?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: Having a problem with timestamps in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Having-a-problem-with-timestamps/m-p/192198#M38333</link>
    <description>&lt;P&gt;The timestamp format you tried is not in the right order.  Have you tried '%m/%d/%Y.*?,%H,%H'?&lt;/P&gt;</description>
    <pubDate>Mon, 09 Jun 2014 11:58:47 GMT</pubDate>
    <dc:creator>richgalloway</dc:creator>
    <dc:date>2014-06-09T11:58:47Z</dc:date>
    <item>
      <title>Having a problem with timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-a-problem-with-timestamps/m-p/192197#M38332</link>
      <description>&lt;P&gt;Good day Splunkers,&lt;/P&gt;

&lt;P&gt;I have a csv file exported from a system that I want to feed to Splunk. The timestamp of these events are in 3 different columns (Date, Hour and Min).&lt;/P&gt;

&lt;P&gt;For Date column values I have these examples:&lt;BR /&gt;
&lt;CODE&gt;&lt;BR /&gt;
6/1/2014 0:00&lt;BR /&gt;
6/2/2014 0:00&lt;BR /&gt;
6/3/2014 0:00&lt;BR /&gt;
&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;When I'm configuring it to Splunk to set timestamp values it will successfully detect the timestamp:&lt;BR /&gt; &lt;BR /&gt;
&lt;CODE&gt;6/1/14 12:00:00.000 AM&lt;/CODE&gt;. &lt;/P&gt;

&lt;P&gt;Now I want to modify the values for hour and minutes which are in the column values (Hour and Min) in my csv.&lt;/P&gt;

&lt;P&gt;I was trying to do it with timestamp format:&lt;BR /&gt;&lt;BR /&gt;
&lt;CODE&gt;%Y/%m/%d.*?,%H,%M&lt;/CODE&gt;&lt;BR /&gt;&lt;BR /&gt;
but can't make it to go to work. There was also this option that says "Specify all the fields which constitute the timestamp. ex: field1,field2,...,fieldn" but I'm not familiar with it. I think it is new with the latest version. I am currently using v.6.1.1.&lt;/P&gt;

&lt;P&gt;Here's a sample from my csv file:&lt;BR /&gt;
&lt;TABLE&gt;&lt;BR /&gt;
&lt;TBODY&gt;&lt;TR&gt;&lt;BR /&gt;
&lt;TD&gt;Date&lt;/TD&gt;   &lt;TD&gt;Hour&lt;/TD&gt;   &lt;TD&gt;Min&lt;/TD&gt;    &lt;TD&gt;CONTROLTYPE&lt;/TD&gt;    &lt;TD&gt;ACTIV_CTRL_SES&lt;/TD&gt;&lt;BR /&gt;
&lt;/TR&gt;&lt;BR /&gt;
&lt;TR&gt;&lt;BR /&gt;
&lt;TD&gt;6/1/2014 0:00&lt;/TD&gt;  &lt;TD&gt;15&lt;/TD&gt; &lt;TD&gt;45&lt;/TD&gt; &lt;TD&gt;gx&lt;/TD&gt; &lt;TD&gt;32&lt;/TD&gt;&lt;BR /&gt;
&lt;/TR&gt;&lt;BR /&gt;
&lt;TR&gt;&lt;BR /&gt;
&lt;TD&gt;6/1/2014 0:00&lt;/TD&gt;  &lt;TD&gt;8&lt;/TD&gt;  &lt;TD&gt;45&lt;/TD&gt; &lt;TD&gt;gx&lt;/TD&gt; &lt;TD&gt;0&lt;/TD&gt;&lt;BR /&gt;
&lt;/TR&gt;&lt;BR /&gt;
&lt;TR&gt;&lt;BR /&gt;
&lt;TD&gt;6/1/2014 0:00&lt;/TD&gt;  &lt;TD&gt;7&lt;/TD&gt;  &lt;TD&gt;15&lt;/TD&gt; &lt;TD&gt;gx&lt;/TD&gt; &lt;TD&gt;0&lt;/TD&gt;&lt;BR /&gt;
&lt;/TR&gt;&lt;BR /&gt;
&lt;TR&gt;&lt;BR /&gt;
&lt;TD&gt;6/1/2014 0:00&lt;/TD&gt;  &lt;TD&gt;14&lt;/TD&gt; &lt;TD&gt;45&lt;/TD&gt; &lt;TD&gt;gx&lt;/TD&gt; &lt;TD&gt;1&lt;/TD&gt;&lt;BR /&gt;
&lt;/TR&gt;&lt;BR /&gt;
&lt;TR&gt;&lt;BR /&gt;
&lt;TD&gt;6/1/2014 0:00&lt;/TD&gt;  &lt;TD&gt;4&lt;/TD&gt;  &lt;TD&gt;30&lt;/TD&gt; &lt;TD&gt;gx&lt;/TD&gt; &lt;TD&gt;1067&lt;/TD&gt;&lt;BR /&gt;
&lt;/TR&gt;&lt;BR /&gt;
&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;
&lt;BR /&gt;&lt;BR /&gt;
So I'm seeking help from you guys. Thanks !&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:49:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-a-problem-with-timestamps/m-p/192197#M38332</guid>
      <dc:creator>crt89</dc:creator>
      <dc:date>2020-09-28T16:49:05Z</dc:date>
    </item>
    <item>
      <title>Re: Having a problem with timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-a-problem-with-timestamps/m-p/192198#M38333</link>
      <description>&lt;P&gt;The timestamp format you tried is not in the right order.  Have you tried '%m/%d/%Y.*?,%H,%H'?&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jun 2014 11:58:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-a-problem-with-timestamps/m-p/192198#M38333</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2014-06-09T11:58:47Z</dc:date>
    </item>
    <item>
      <title>Re: Having a problem with timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-a-problem-with-timestamps/m-p/192199#M38334</link>
      <description>&lt;P&gt;&lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; must be specified using &lt;CODE&gt;strptime&lt;/CODE&gt; format (&lt;A href="http://pubs.opengroup.org/onlinepubs/007904975/functions/strptime.html"&gt;strptime definition&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;There is no syntax in &lt;CODE&gt;strptime&lt;/CODE&gt; for "skip some characters" - you are trying to use a regular expression and that doesn't work.&lt;/P&gt;

&lt;P&gt;In 6.1.1, you &lt;EM&gt;can&lt;/EM&gt; do indexed time field extractions for a CSV file and specify the fields that make up the timestamp, as you mentioned. That isn't going to help in this case though.&lt;/P&gt;

&lt;P&gt;The problem is, your &lt;CODE&gt;Date&lt;/CODE&gt; field contains an incorrect specification of the time.  That is what you are trying to work around: the fact that your input file is broken.&lt;/P&gt;

&lt;P&gt;The only real solution is to fix your &lt;CODE&gt;Date&lt;/CODE&gt; field. You don't have to make it the right time, just set the output format so it doesn't print the time at all. Then you could use either the &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; specifier in &lt;CODE&gt;props.conf&lt;/CODE&gt; or indexed field extractions.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Jun 2014 14:37:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-a-problem-with-timestamps/m-p/192199#M38334</guid>
      <dc:creator>lguinn2</dc:creator>
      <dc:date>2014-06-09T14:37:24Z</dc:date>
    </item>
    <item>
      <title>Re: Having a problem with timestamps</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Having-a-problem-with-timestamps/m-p/192200#M38335</link>
      <description>&lt;P&gt;Hi @lguinn thanks for your reply. This is actually what I had in mind, the source file was extracted to a separate system I would just ask if the Date field value can be changed removing the time as saving it to csv. We are also trying to make this automated so that the user won't have to manually edit the file. Thanks again&lt;/P&gt;</description>
      <pubDate>Tue, 10 Jun 2014 02:34:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Having-a-problem-with-timestamps/m-p/192200#M38335</guid>
      <dc:creator>crt89</dc:creator>
      <dc:date>2014-06-10T02:34:06Z</dc:date>
    </item>
  </channel>
</rss>

