<?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: convert date to readable format in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/convert-date-to-readable-format/m-p/102586#M26514</link>
    <description>&lt;P&gt;date is in the format yyyymmdd so output should be 24-01-2013.. but result obtained is something else.. tried changing time date variables&lt;/P&gt;</description>
    <pubDate>Tue, 29 Jan 2013 08:24:11 GMT</pubDate>
    <dc:creator>katesplunk</dc:creator>
    <dc:date>2013-01-29T08:24:11Z</dc:date>
    <item>
      <title>convert date to readable format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-date-to-readable-format/m-p/102584#M26512</link>
      <description>&lt;P&gt;Experts, &lt;BR /&gt;
Time of the log is appended in my source file name ... I want it to be converted into a human readable format and i prefer assigning the same to a field . lets say new_time.. Hope u can help me...&lt;BR /&gt;
Sample file name&lt;BR /&gt;
...... 20130124 ......... file.txt&lt;BR /&gt;
...... 20121229.......... file.txt&lt;BR /&gt;
Thanks &lt;BR /&gt;
Katrine&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jan 2013 07:27:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-date-to-readable-format/m-p/102584#M26512</guid>
      <dc:creator>katesplunk</dc:creator>
      <dc:date>2013-01-29T07:27:46Z</dc:date>
    </item>
    <item>
      <title>Re: convert date to readable format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-date-to-readable-format/m-p/102585#M26513</link>
      <description>&lt;P&gt;first, extract the date from the source.&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;source=*mysource* | rex field=source "(?&amp;lt;_date_&amp;gt;\d{8})" | table _date_&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;see &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Rex"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Rex&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;second convert the date using your format of choice .&lt;BR /&gt;
&lt;CODE&gt;mysearch | convert TIMEFORMAT="%Y-%m-%d" ctime(_date_) AS date&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;see &lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Convert"&gt;http://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Convert&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jan 2013 07:37:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-date-to-readable-format/m-p/102585#M26513</guid>
      <dc:creator>yannK</dc:creator>
      <dc:date>2013-01-29T07:37:31Z</dc:date>
    </item>
    <item>
      <title>Re: convert date to readable format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-date-to-readable-format/m-p/102586#M26514</link>
      <description>&lt;P&gt;date is in the format yyyymmdd so output should be 24-01-2013.. but result obtained is something else.. tried changing time date variables&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jan 2013 08:24:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-date-to-readable-format/m-p/102586#M26514</guid>
      <dc:creator>katesplunk</dc:creator>
      <dc:date>2013-01-29T08:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: convert date to readable format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-date-to-readable-format/m-p/102587#M26515</link>
      <description>&lt;P&gt;What did you try exactly?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Jan 2013 08:45:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-date-to-readable-format/m-p/102587#M26515</guid>
      <dc:creator>Drainy</dc:creator>
      <dc:date>2013-01-29T08:45:26Z</dc:date>
    </item>
    <item>
      <title>Re: convert date to readable format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/convert-date-to-readable-format/m-p/102588#M26516</link>
      <description>&lt;P&gt;have the same query, but i dont want it to be in readable format as i am using this time for sorting my field entries..&lt;BR /&gt;
How to convert the date in the above format to epoch time?&lt;BR /&gt;
201303140216&lt;BR /&gt;
yyyymmddHHMM&lt;BR /&gt;
here hour and minute is in 12 hours clock, so the time may be 02:16PM&lt;BR /&gt;
tried converting it using &lt;BR /&gt;
time=strptime(mytime,"%Y%m%d%I%M") &lt;BR /&gt;
not seems to be working properly...&lt;BR /&gt;
please help&lt;/P&gt;</description>
      <pubDate>Thu, 14 Mar 2013 10:00:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/convert-date-to-readable-format/m-p/102588#M26516</guid>
      <dc:creator>smolcj</dc:creator>
      <dc:date>2013-03-14T10:00:32Z</dc:date>
    </item>
  </channel>
</rss>

