<?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 extract month from a date field in Reporting</title>
    <link>https://community.splunk.com/t5/Reporting/extract-month-from-a-date-field/m-p/566019#M10985</link>
    <description>&lt;P&gt;Hi, I hav a "Planned Start date" Field through which I am trying to extract month in the format (e.g January).Can somebody suggest? Below is what i have tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kajolsharma_1-1630936881672.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15866i8ED1F71A2F613AAB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kajolsharma_1-1630936881672.png" alt="kajolsharma_1-1630936881672.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;index="tier1" sourcetype="csv"| stats latest("Planned Start Date") AS Time| eval monthdisplay=strftime(strptime('Planned Start Date',"%m-%d-%Y"),"%B")|fields Time monthdisplay&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Sep 2021 14:02:18 GMT</pubDate>
    <dc:creator>kajolsharma</dc:creator>
    <dc:date>2021-09-06T14:02:18Z</dc:date>
    <item>
      <title>extract month from a date field</title>
      <link>https://community.splunk.com/t5/Reporting/extract-month-from-a-date-field/m-p/566019#M10985</link>
      <description>&lt;P&gt;Hi, I hav a "Planned Start date" Field through which I am trying to extract month in the format (e.g January).Can somebody suggest? Below is what i have tried&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="kajolsharma_1-1630936881672.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/15866i8ED1F71A2F613AAB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="kajolsharma_1-1630936881672.png" alt="kajolsharma_1-1630936881672.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;index="tier1" sourcetype="csv"| stats latest("Planned Start Date") AS Time| eval monthdisplay=strftime(strptime('Planned Start Date',"%m-%d-%Y"),"%B")|fields Time monthdisplay&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 14:02:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/extract-month-from-a-date-field/m-p/566019#M10985</guid>
      <dc:creator>kajolsharma</dc:creator>
      <dc:date>2021-09-06T14:02:18Z</dc:date>
    </item>
    <item>
      <title>Re: extract month from a date field</title>
      <link>https://community.splunk.com/t5/Reporting/extract-month-from-a-date-field/m-p/566024#M10986</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/235797"&gt;@kajolsharma&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;There two errors:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The field name to use is "Time",&lt;/LI&gt;&lt;LI&gt;date form is wrong.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;please try something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="tier1" sourcetype="csv"
| stats latest("Planned Start Date") AS Time
| eval monthdisplay=strftime(strptime(Time,"%m/%d/%Y"),"%B")
| fields Time monthdisplay&lt;/LI-CODE&gt;&lt;P&gt;Eventually use double quotes also in the strptime function and, possibly, avoid spaces in the field names!&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 06 Sep 2021 14:10:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Reporting/extract-month-from-a-date-field/m-p/566024#M10986</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-09-06T14:10:23Z</dc:date>
    </item>
  </channel>
</rss>

