<?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: Extrating fields with the single dates of the month? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Extrating-fields-with-the-single-dates-of-the-month/m-p/188011#M187074</link>
    <description>&lt;P&gt;You can try using &lt;STRONG&gt;strptime&lt;/STRONG&gt; and &lt;STRONG&gt;strftime&lt;/STRONG&gt; commands for formating the time. More details @&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Commontimeformatvariables"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Commontimeformatvariables&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/CommonEvalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
    <pubDate>Wed, 01 Jul 2015 10:20:17 GMT</pubDate>
    <dc:creator>vganjare</dc:creator>
    <dc:date>2015-07-01T10:20:17Z</dc:date>
    <item>
      <title>Extrating fields with the single dates of the month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extrating-fields-with-the-single-dates-of-the-month/m-p/188010#M187073</link>
      <description>&lt;P&gt;Hi Splunkers,&lt;/P&gt;

&lt;P&gt;Im having this serious problem. Is there any way to transform or modify a log coming to a certain index? &lt;/P&gt;

&lt;P&gt;Example: I have logs like this:&lt;/P&gt;

&lt;P&gt;Jul 1 08:00:00 user service : example logs&lt;/P&gt;

&lt;P&gt;I want to modify into :&lt;/P&gt;

&lt;P&gt;07-01 08:00:00 user service : example logs&lt;/P&gt;

&lt;P&gt;Is this possible? Im going to do log extraction for my alerting.&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 09:46:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extrating-fields-with-the-single-dates-of-the-month/m-p/188010#M187073</guid>
      <dc:creator>sympatiko</dc:creator>
      <dc:date>2015-07-01T09:46:20Z</dc:date>
    </item>
    <item>
      <title>Re: Extrating fields with the single dates of the month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extrating-fields-with-the-single-dates-of-the-month/m-p/188011#M187074</link>
      <description>&lt;P&gt;You can try using &lt;STRONG&gt;strptime&lt;/STRONG&gt; and &lt;STRONG&gt;strftime&lt;/STRONG&gt; commands for formating the time. More details @&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Commontimeformatvariables"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Commontimeformatvariables&lt;/A&gt;&lt;BR /&gt;
&lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/CommonEvalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Thanks!!&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 10:20:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extrating-fields-with-the-single-dates-of-the-month/m-p/188011#M187074</guid>
      <dc:creator>vganjare</dc:creator>
      <dc:date>2015-07-01T10:20:17Z</dc:date>
    </item>
    <item>
      <title>Re: Extrating fields with the single dates of the month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extrating-fields-with-the-single-dates-of-the-month/m-p/188012#M187075</link>
      <description>&lt;P&gt;Hi vganjare,&lt;/P&gt;

&lt;P&gt;Im very newbie at splunk and there are some terms that made me confused. Can you give me some sample?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 10:33:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extrating-fields-with-the-single-dates-of-the-month/m-p/188012#M187075</guid>
      <dc:creator>sympatiko</dc:creator>
      <dc:date>2015-07-01T10:33:16Z</dc:date>
    </item>
    <item>
      <title>Re: Extrating fields with the single dates of the month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extrating-fields-with-the-single-dates-of-the-month/m-p/188013#M187076</link>
      <description>&lt;P&gt;Lets take this example:&lt;BR /&gt;
Jul 1 08:00:00 ==&amp;gt; &lt;STRONG&gt;%b %d %H:%M:%S&lt;/STRONG&gt; (refer to &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Commontimeformatvariables"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/Commontimeformatvariables&lt;/A&gt;)&lt;/P&gt;

&lt;P&gt;07-01 08:00:00 ==&amp;gt; %m-%d %H:%M:%S&lt;/P&gt;

&lt;P&gt;Your query should look like:&lt;BR /&gt;
    ...... | eval customTime = strftime(_time, "%m-%d %H:%M:%S")&lt;/P&gt;

&lt;P&gt;Check the examples of strftime and strptime at &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/CommonEvalFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/6.2.2/SearchReference/CommonEvalFunctions&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 10:45:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extrating-fields-with-the-single-dates-of-the-month/m-p/188013#M187076</guid>
      <dc:creator>vganjare</dc:creator>
      <dc:date>2015-07-01T10:45:11Z</dc:date>
    </item>
    <item>
      <title>Re: Extrating fields with the single dates of the month?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Extrating-fields-with-the-single-dates-of-the-month/m-p/188014#M187077</link>
      <description>&lt;P&gt;Because I configured an alerting with field extraction. So I only notice now that Every 1-9 of the month the logs has a space between the month and the day. &lt;/P&gt;

&lt;P&gt;Sample : Jul  1 ....... &lt;/P&gt;

&lt;P&gt;It has extra space so it causes my custom alerts to read the different parameter based on my extracted fields on my query.&lt;/P&gt;</description>
      <pubDate>Wed, 01 Jul 2015 13:53:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Extrating-fields-with-the-single-dates-of-the-month/m-p/188014#M187077</guid>
      <dc:creator>sympatiko</dc:creator>
      <dc:date>2015-07-01T13:53:22Z</dc:date>
    </item>
  </channel>
</rss>

