<?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: Format Date in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183018#M52704</link>
    <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[csv-2] 
KV_MODE = none 
REPORT-AutoHeader = AutoHeader-1 
SHOULD_LINEMERGE = False 
pulldown_type = true 
TIME_FORMAT = "%d-%b-%y %H:%M:%S %p
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 12 Mar 2014 18:09:47 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2014-03-12T18:09:47Z</dc:date>
    <item>
      <title>Format Date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183012#M52698</link>
      <description>&lt;P&gt;Hi -&lt;/P&gt;

&lt;P&gt;I have a raw event which has raw event lines as&lt;BR /&gt;
"11-Mar-14 9:38:58 PM",300,64.00000000&lt;BR /&gt;
This was from today 11 March 2014&lt;/P&gt;

&lt;P&gt;Now the event Date as figured by Splunk is &lt;BR /&gt;
»  3/14/11&lt;BR /&gt;
9:38:58.000 PM&lt;BR /&gt;
Splunk is treating it as one event from year 2011&lt;/P&gt;

&lt;P&gt;I read through time formatting document and made changes in props.conf with new event type&lt;BR /&gt;
but still no luck.&lt;BR /&gt;
My props.conf looks like:&lt;/P&gt;

&lt;P&gt;[csv-2]&lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
REPORT-AutoHeader = AutoHeader-1&lt;BR /&gt;
SHOULD_LINEMERGE = False&lt;BR /&gt;
pulldown_type = true&lt;BR /&gt;
TIME_FORMAT = %d-%b-%y %H:%M:%S.%3N %Z&lt;/P&gt;

&lt;P&gt;Not sure why it is not working, any suggestion will be greatly appreciated. I also tried&lt;BR /&gt;
TIME_FORMAT = %d-%b-%y %H:%M:%S with no luck. Please suggest/help&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:06:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183012#M52698</guid>
      <dc:creator>nikhilmehra79</dc:creator>
      <dc:date>2020-09-28T16:06:10Z</dc:date>
    </item>
    <item>
      <title>Re: Format Date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183013#M52699</link>
      <description>&lt;P&gt;probably 3 issues :&lt;BR /&gt;
 -  the %Z, there is not timezone in your timestamp&lt;BR /&gt;
 - and the %3N for the millisecongs, they are none in your timestamp&lt;BR /&gt;
 - and if you have PM/AM notation , it means that your hour is on a 12'clock not a 24h clock&lt;BR /&gt;
check the documentation for the TIME_FORMAT&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 05:21:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183013#M52699</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2014-03-12T05:21:12Z</dc:date>
    </item>
    <item>
      <title>Re: Format Date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183014#M52700</link>
      <description>&lt;P&gt;So i even tried &lt;BR /&gt;
%d-%b-%y %H:%M:%S %p&lt;BR /&gt;
%p for AM and PM&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 05:25:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183014#M52700</guid>
      <dc:creator>nikhilmehra79</dc:creator>
      <dc:date>2014-03-12T05:25:14Z</dc:date>
    </item>
    <item>
      <title>Re: Format Date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183015#M52701</link>
      <description>&lt;P&gt;Hi nikhil,&lt;/P&gt;

&lt;P&gt;can u pls try the following ??&lt;/P&gt;

&lt;P&gt;TIME_PREFIX = \"&lt;BR /&gt;
TIME_FORMAT = %d-%b-%y %H:%M:%S %p&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:06:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183015#M52701</guid>
      <dc:creator>rakesh_498115</dc:creator>
      <dc:date>2020-09-28T16:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Format Date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183016#M52702</link>
      <description>&lt;P&gt;Rakesh thanks....actually i tried similar one :&lt;BR /&gt;
Here is my props.conf&lt;BR /&gt;
KV_MODE = none&lt;BR /&gt;
REPORT-AutoHeader = AutoHeader-1&lt;BR /&gt;
SHOULD_LINEMERGE = False&lt;BR /&gt;
pulldown_type = true&lt;BR /&gt;
TRANSFORMS-sortdate = resortdate&lt;BR /&gt;
TIME_PREFIX=^\d+&lt;BR /&gt;
TIME_FORMAT = %d-%b-%y %H:%M:%S %p&lt;/P&gt;

&lt;P&gt;and my transforms.conf&lt;BR /&gt;
[resortdate]&lt;BR /&gt;
REGEX = ^(\d{2})-(.*)-(\d{2})\s([^/]+)&lt;BR /&gt;
FORMAT = $2/$1/$3 $4&lt;BR /&gt;
DEST_KEY = _raw &lt;/P&gt;

&lt;P&gt;I am able to get date moved to current day with this but all the events in file inserted in splunk at one time - so say i have 10 events with time stamp 1:00, time stamp 2:00, time stamp 3:00 in log file&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:06:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183016#M52702</guid>
      <dc:creator>nikhilmehra79</dc:creator>
      <dc:date>2020-09-28T16:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Format Date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183017#M52703</link>
      <description>&lt;P&gt;and say splunk read at 5:00 then splunk is showing 5:00 as time for all events instead of individual events as logged in log file&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 15:59:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183017#M52703</guid>
      <dc:creator>nikhilmehra79</dc:creator>
      <dc:date>2014-03-12T15:59:17Z</dc:date>
    </item>
    <item>
      <title>Re: Format Date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183018#M52704</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[csv-2] 
KV_MODE = none 
REPORT-AutoHeader = AutoHeader-1 
SHOULD_LINEMERGE = False 
pulldown_type = true 
TIME_FORMAT = "%d-%b-%y %H:%M:%S %p
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 12 Mar 2014 18:09:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183018#M52704</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2014-03-12T18:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Format Date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183019#M52705</link>
      <description>&lt;P&gt;Hello,&lt;BR /&gt;
Could you try this?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[csv-2] 
KV_MODE = none 
REPORT-AutoHeader = AutoHeader-1 
SHOULD_LINEMERGE = False 
TIME_FORMAT = %d-%b-%y %I:%M:%S %p
TIME_PREFIX="
pulldown_type = true 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 12 Mar 2014 18:36:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183019#M52705</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-03-12T18:36:55Z</dc:date>
    </item>
    <item>
      <title>Re: Format Date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183020#M52706</link>
      <description>&lt;P&gt;i think this worked my props.conf looks as below, &lt;BR /&gt;
i have a quick question though - does this mean the raw format in event is now changed and indexed like that and i do not need to modify muy transforms.conf as i pointed above, is props.conf entry for TIME_FORMAT and TIME_PREFIX is enough to make this change in raw events for future.&lt;BR /&gt;
[csv-2] &lt;BR /&gt;
KV_MODE = none &lt;BR /&gt;
REPORT-AutoHeader = AutoHeader-1 &lt;BR /&gt;
SHOULD_LINEMERGE = False &lt;BR /&gt;
TIME_FORMAT = %d-%b-%y %I:%M:%S %p&lt;BR /&gt;
TIME_PREFIX="&lt;BR /&gt;
pulldown_type = true&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 16:07:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183020#M52706</guid>
      <dc:creator>nikhilmehra79</dc:creator>
      <dc:date>2020-09-28T16:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Format Date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183021#M52707</link>
      <description>&lt;P&gt;once this is recognized in splunk, the defualt _time field will be assigned. transforms is not affected by this change.&lt;/P&gt;

&lt;P&gt;Feel free to accept as answer..&lt;/P&gt;</description>
      <pubDate>Thu, 13 Mar 2014 18:20:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Format-Date/m-p/183021#M52707</guid>
      <dc:creator>linu1988</dc:creator>
      <dc:date>2014-03-13T18:20:19Z</dc:date>
    </item>
  </channel>
</rss>

