<?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 How to change date format multiple time in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-date-format-multiple-time/m-p/614551#M106339</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to change my date format two times because i want to sort to order my month from January to December.&lt;/P&gt;&lt;P&gt;I've been trying this search but the field newPeriode2 isn't showing any results :&lt;/P&gt;&lt;P&gt;| eval newPeriode = strftime(strptime(Période,"%Y-%m-%d"),"%m-%Y")&lt;BR /&gt;| sort newPeriode&lt;BR /&gt;| eval newPeriode2 = strftime(strptime(newPeriode,"%m-%Y"), "%B-%Y")&lt;/P&gt;&lt;P&gt;this is what it looks like. I want my newPeriode2 looks like : January-2022 etc...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fatanyk_0-1664195890878.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21664iB1BE54AE9B3E6CE9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fatanyk_0-1664195890878.png" alt="fatanyk_0-1664195890878.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help ! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 26 Sep 2022 12:42:07 GMT</pubDate>
    <dc:creator>fatanyk</dc:creator>
    <dc:date>2022-09-26T12:42:07Z</dc:date>
    <item>
      <title>How to change date format multiple time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-date-format-multiple-time/m-p/614551#M106339</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm trying to change my date format two times because i want to sort to order my month from January to December.&lt;/P&gt;&lt;P&gt;I've been trying this search but the field newPeriode2 isn't showing any results :&lt;/P&gt;&lt;P&gt;| eval newPeriode = strftime(strptime(Période,"%Y-%m-%d"),"%m-%Y")&lt;BR /&gt;| sort newPeriode&lt;BR /&gt;| eval newPeriode2 = strftime(strptime(newPeriode,"%m-%Y"), "%B-%Y")&lt;/P&gt;&lt;P&gt;this is what it looks like. I want my newPeriode2 looks like : January-2022 etc...&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="fatanyk_0-1664195890878.png" style="width: 400px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/21664iB1BE54AE9B3E6CE9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="fatanyk_0-1664195890878.png" alt="fatanyk_0-1664195890878.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help ! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 12:42:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-date-format-multiple-time/m-p/614551#M106339</guid>
      <dc:creator>fatanyk</dc:creator>
      <dc:date>2022-09-26T12:42:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to change date format multiple time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-date-format-multiple-time/m-p/614561#M106342</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;just convert it to epoch and then sort&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval newPeriode = strptime(Période,"%Y-%m-%d %H:%M:%S")
| sort newPeriode
| eval newPeriode2 = strftime(newPeriode, "%B-%Y")&lt;/LI-CODE&gt;&lt;P&gt;As epoch is a integer it will sort time correctly. Then just convert it back to you desired format.&lt;/P&gt;&lt;P&gt;r. Ismo&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 13:01:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-date-format-multiple-time/m-p/614561#M106342</guid>
      <dc:creator>isoutamo</dc:creator>
      <dc:date>2022-09-26T13:01:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to change date format multiple time</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-change-date-format-multiple-time/m-p/614562#M106343</link>
      <description>&lt;P&gt;Thank you for your help !&amp;nbsp;&lt;/P&gt;&lt;P&gt;This work !&lt;/P&gt;</description>
      <pubDate>Mon, 26 Sep 2022 13:15:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-change-date-format-multiple-time/m-p/614562#M106343</guid>
      <dc:creator>fatanyk</dc:creator>
      <dc:date>2022-09-26T13:15:35Z</dc:date>
    </item>
  </channel>
</rss>

