<?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: To findout month and week from a Field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76373#M19310</link>
    <description>&lt;P&gt;I mean to say that I want week number from this search so that I can make chart wrt week number&lt;/P&gt;</description>
    <pubDate>Wed, 22 Feb 2012 10:24:25 GMT</pubDate>
    <dc:creator>kml_uvce</dc:creator>
    <dc:date>2012-02-22T10:24:25Z</dc:date>
    <item>
      <title>To findout month and week from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76367#M19304</link>
      <description>&lt;P&gt;I have a field like in this format 2012-02-11&lt;BR /&gt;
This field is in many events with diffrent year-month-day.&lt;/P&gt;

&lt;P&gt;I want to make a search in which I can extaract information wrt month and week from this field.&lt;BR /&gt;
How I can do this&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 09:59:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76367#M19304</guid>
      <dc:creator>kml_uvce</dc:creator>
      <dc:date>2012-02-22T09:59:58Z</dc:date>
    </item>
    <item>
      <title>Re: To findout month and week from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76368#M19305</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;... | rex field=yourfield "(?&amp;lt;year&amp;gt;.+?)-(?&amp;lt;month&amp;gt;.+?)-(?&amp;lt;day&amp;gt;.+)"
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Substitute &lt;CODE&gt;yourfield&lt;/CODE&gt; with whatever your field is called.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 10:13:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76368#M19305</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-02-22T10:13:33Z</dc:date>
    </item>
    <item>
      <title>Re: To findout month and week from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76369#M19306</link>
      <description>&lt;P&gt;ok it works for month , but how I can figure out about the week&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 10:19:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76369#M19306</guid>
      <dc:creator>kml_uvce</dc:creator>
      <dc:date>2012-02-22T10:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: To findout month and week from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76370#M19307</link>
      <description>&lt;P&gt;What do you mean by week, week number?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 10:20:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76370#M19307</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-02-22T10:20:00Z</dc:date>
    </item>
    <item>
      <title>Re: To findout month and week from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76371#M19308</link>
      <description>&lt;P&gt;yes, its week number&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 10:22:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76371#M19308</guid>
      <dc:creator>kml_uvce</dc:creator>
      <dc:date>2012-02-22T10:22:21Z</dc:date>
    </item>
    <item>
      <title>Re: To findout month and week from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76372#M19309</link>
      <description>&lt;P&gt;Not easily done, as that will change from year to year. Your best bet would probably be to create a lookup file that maps dates to week numbers and use that.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 10:24:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76372#M19309</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-02-22T10:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: To findout month and week from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76373#M19310</link>
      <description>&lt;P&gt;I mean to say that I want week number from this search so that I can make chart wrt week number&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 10:24:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76373#M19310</guid>
      <dc:creator>kml_uvce</dc:creator>
      <dc:date>2012-02-22T10:24:25Z</dc:date>
    </item>
    <item>
      <title>Re: To findout month and week from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76374#M19311</link>
      <description>&lt;P&gt;Correcting myself - apparently &lt;CODE&gt;strftime&lt;/CODE&gt; can handle this, using the %u (week starting on Monday) or %U (week starting on Sunday) parameter!&lt;/P&gt;

&lt;P&gt;You could do something like this to get the week number:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval week=strftime(strptime(yourfield,"%Y-%m-%d"),"%U")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 22 Feb 2012 10:31:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76374#M19311</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-02-22T10:31:47Z</dc:date>
    </item>
    <item>
      <title>Re: To findout month and week from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76375#M19312</link>
      <description>&lt;P&gt;cool it works , also is there any way to find month name also (jan ,feb etc) form search?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 10:40:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76375#M19312</guid>
      <dc:creator>kml_uvce</dc:creator>
      <dc:date>2012-02-22T10:40:24Z</dc:date>
    </item>
    <item>
      <title>Re: To findout month and week from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76376#M19313</link>
      <description>&lt;P&gt;Yes, using the same technique. Look up all strftime parameters, there are many different ones.&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 10:41:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76376#M19313</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-02-22T10:41:13Z</dc:date>
    </item>
    <item>
      <title>Re: To findout month and week from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76377#M19314</link>
      <description>&lt;P&gt;I am not able to find out the complete doc for strftime, can you make this search ?&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 12:05:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76377#M19314</guid>
      <dc:creator>kml_uvce</dc:creator>
      <dc:date>2012-02-22T12:05:06Z</dc:date>
    </item>
    <item>
      <title>Re: To findout month and week from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76378#M19315</link>
      <description>&lt;P&gt;With all due respect: &lt;A href="http://lmgtfy.com/?q=strftime"&gt;http://lmgtfy.com/?q=strftime&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 12:07:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76378#M19315</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-02-22T12:07:29Z</dc:date>
    </item>
    <item>
      <title>Re: To findout month and week from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76379#M19316</link>
      <description>&lt;P&gt;Thanks this works for me now...&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 12:09:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76379#M19316</guid>
      <dc:creator>kml_uvce</dc:creator>
      <dc:date>2012-02-22T12:09:48Z</dc:date>
    </item>
    <item>
      <title>Re: To findout month and week from a Field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76380#M19317</link>
      <description>&lt;P&gt;Excellent. Could you please mark my answer as accepted? Thanks!&lt;/P&gt;</description>
      <pubDate>Wed, 22 Feb 2012 12:51:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/To-findout-month-and-week-from-a-Field/m-p/76380#M19317</guid>
      <dc:creator>Ayn</dc:creator>
      <dc:date>2012-02-22T12:51:32Z</dc:date>
    </item>
  </channel>
</rss>

