<?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 Convert month field from csv  in different format? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Convert-month-field-from-csv-in-different-format/m-p/527682#M148971</link>
    <description>&lt;P&gt;My csv file has&amp;nbsp; "month" field and the values are as below :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2020-10
2020-09
2020-08
2020-07
2020-06
2020-05
2020-04
2020-03
2020-02
2020-01&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to convert the months from number to Jan, Feb, Mar, Apr and so on... I tried using strptime, but that is not working. I want to show it as 2020-Jan, 2020-Feb, 2020-Mar...&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help , below is my query :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=azure sourcetype=azure_total_cost source="C:\total_cost\\azure_total_cost_by_year.csv" month!="month" | eval mymonth=strftime(month, "%Y-%b")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 03 Nov 2020 10:10:55 GMT</pubDate>
    <dc:creator>pgadhari</dc:creator>
    <dc:date>2020-11-03T10:10:55Z</dc:date>
    <item>
      <title>Convert month field from csv  in different format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-month-field-from-csv-in-different-format/m-p/527682#M148971</link>
      <description>&lt;P&gt;My csv file has&amp;nbsp; "month" field and the values are as below :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;2020-10
2020-09
2020-08
2020-07
2020-06
2020-05
2020-04
2020-03
2020-02
2020-01&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to convert the months from number to Jan, Feb, Mar, Apr and so on... I tried using strptime, but that is not working. I want to show it as 2020-Jan, 2020-Feb, 2020-Mar...&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help , below is my query :&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index=azure sourcetype=azure_total_cost source="C:\total_cost\\azure_total_cost_by_year.csv" month!="month" | eval mymonth=strftime(month, "%Y-%b")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 10:10:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-month-field-from-csv-in-different-format/m-p/527682#M148971</guid>
      <dc:creator>pgadhari</dc:creator>
      <dc:date>2020-11-03T10:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: Convert month field from csv  in different format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-month-field-from-csv-in-different-format/m-p/527688#M148973</link>
      <description>&lt;P&gt;Add a dummy "day" to the month and try converting it&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;|makeresults|eval month="2020-10"|eval nMonth=month."-01"|eval formattedMonth=strftime(strptime(nMonth,"%Y-%m-%d"),"%Y-%b")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 11:28:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-month-field-from-csv-in-different-format/m-p/527688#M148973</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2020-11-03T11:28:34Z</dc:date>
    </item>
    <item>
      <title>Re: Convert month field from csv  in different format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Convert-month-field-from-csv-in-different-format/m-p/527696#M148978</link>
      <description>&lt;P&gt;Yes&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/136781"&gt;@renjith_nair&lt;/a&gt;&amp;nbsp;. I am able to resolve the issue with the above query. Thank you very much for immediate respnose.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 12:24:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Convert-month-field-from-csv-in-different-format/m-p/527696#M148978</guid>
      <dc:creator>pgadhari</dc:creator>
      <dc:date>2020-11-03T12:24:06Z</dc:date>
    </item>
  </channel>
</rss>

