<?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: How do I write a search to change the format of a date from &amp;quot;1942-01-24&amp;quot; to &amp;quot;24/01/1942&amp;quot;? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256239#M76715</link>
    <description>&lt;P&gt;Hi, thank you for this.&lt;/P&gt;

&lt;P&gt;I changed the date you entered to my field name to get the raw data and I've included a, b and c in my table but unfortunately this doesn't return any data.&lt;/P&gt;

&lt;P&gt;Is it also possible that the output could be displayed in one field rather than a, b and c.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
    <pubDate>Fri, 02 Oct 2015 09:42:02 GMT</pubDate>
    <dc:creator>IRHM73</dc:creator>
    <dc:date>2015-10-02T09:42:02Z</dc:date>
    <item>
      <title>How do I write a search to change the format of a date from "1942-01-24" to "24/01/1942"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256237#M76713</link>
      <description>&lt;P&gt;Hi, &lt;/P&gt;

&lt;P&gt;I wonder whether someone may be able to help me please.&lt;/P&gt;

&lt;P&gt;I have a date in one of my searches which is in this format: &lt;CODE&gt;1942-01-24&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Could someone tell me please if is it possible to change this to: &lt;CODE&gt;24/01/1942&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;Many thanks and kind Regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2015 08:54:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256237#M76713</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-10-02T08:54:52Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write a search to change the format of a date from "1942-01-24" to "24/01/1942"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256238#M76714</link>
      <description>&lt;P&gt;What with this?&lt;/P&gt;

&lt;P&gt;・・・・|eval a="2015-10-02"|eval b=strftime(strptime(a,"%Y-%m-%d"),"%d/%m/%Y")|eval c=substr(a,9,2)+"/"+substr(a,6,2)+"/"+substr(a,1,4)|table a b c&lt;/P&gt;

&lt;P&gt;However, use the C because that can not be calculated in 1942.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2015 09:37:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256238#M76714</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2015-10-02T09:37:09Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write a search to change the format of a date from "1942-01-24" to "24/01/1942"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256239#M76715</link>
      <description>&lt;P&gt;Hi, thank you for this.&lt;/P&gt;

&lt;P&gt;I changed the date you entered to my field name to get the raw data and I've included a, b and c in my table but unfortunately this doesn't return any data.&lt;/P&gt;

&lt;P&gt;Is it also possible that the output could be displayed in one field rather than a, b and c.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2015 09:42:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256239#M76715</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-10-02T09:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write a search to change the format of a date from "1942-01-24" to "24/01/1942"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256240#M76716</link>
      <description>&lt;P&gt;Normally I think it is correct to convert using the strptime. &lt;BR /&gt;
However, the date of the previous 1970 this function does not seem to work.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2015 09:49:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256240#M76716</guid>
      <dc:creator>HiroshiSatoh</dc:creator>
      <dc:date>2015-10-02T09:49:36Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write a search to change the format of a date from "1942-01-24" to "24/01/1942"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256241#M76717</link>
      <description>&lt;P&gt;Another way of converting would be:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| stats count | eval date="1942-01-24" | eval date=replace(date,"(\d+)-(\d+)-(\d+)","\3/\2/\1") | table date
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Hth,&lt;BR /&gt;
Kai.&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2015 10:08:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256241#M76717</guid>
      <dc:creator>knielsen</dc:creator>
      <dc:date>2015-10-02T10:08:44Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write a search to change the format of a date from "1942-01-24" to "24/01/1942"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256242#M76718</link>
      <description>&lt;P&gt;Many thanks, hopefully someone else may be able to look at this.&lt;/P&gt;

&lt;P&gt;Kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Fri, 02 Oct 2015 11:08:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256242#M76718</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-10-02T11:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write a search to change the format of a date from "1942-01-24" to "24/01/1942"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256243#M76719</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; | stats count | eval date="1942-01-24" | rex mode=sed field=date "s/(\d+)-(\d+)-(\d+)/\3\/\2\/\1/" | table date
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 04 Oct 2015 17:19:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256243#M76719</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2015-10-04T17:19:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write a search to change the format of a date from "1942-01-24" to "24/01/1942"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256244#M76720</link>
      <description>&lt;P&gt;Hi @kai, thank you for taking the time to reply to my post.&lt;/P&gt;

&lt;P&gt;This works perfectly.&lt;/P&gt;

&lt;P&gt;Many thanks and kindest regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2015 05:59:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256244#M76720</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-10-05T05:59:26Z</dc:date>
    </item>
    <item>
      <title>Re: How do I write a search to change the format of a date from "1942-01-24" to "24/01/1942"?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256245#M76721</link>
      <description>&lt;P&gt;Hi @woodcock, thank you for taking the time to reply to my post. Your solution works great.&lt;/P&gt;

&lt;P&gt;Many thanks and kind regards&lt;/P&gt;

&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Mon, 05 Oct 2015 06:02:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-do-I-write-a-search-to-change-the-format-of-a-date-from-quot/m-p/256245#M76721</guid>
      <dc:creator>IRHM73</dc:creator>
      <dc:date>2015-10-05T06:02:20Z</dc:date>
    </item>
  </channel>
</rss>

