<?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 to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288394#M87316</link>
    <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[YOUR BASE SEARCH]
| eval alert_started_at=strftime(strptime(alert_started_at,"%Y-%m-%dT%H:%M:%S.%3q%Z"),"%m/%d/%Y %p") 
| eval alert_ended_at=strftime(strptime(alert_ended_at,"%Y-%m-%dT%H:%M:%S.%3q%Z"),"%m/%d/%Y %p") 
| table alert_started_at alert_ended_at
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will overwrite the original value of alert_started_at and alert_ended_at, so if you want to maintain that original values, you should change the fieldname before the equals to your new field name.  Also, the second date format is just an example, use the documentation link from my earlier answer to format the date the way you want it.&lt;/P&gt;

&lt;P&gt;The first format should work for your posted date format in your question.&lt;/P&gt;</description>
    <pubDate>Tue, 29 Sep 2020 14:03:09 GMT</pubDate>
    <dc:creator>kmorris_splunk</dc:creator>
    <dc:date>2020-09-29T14:03:09Z</dc:date>
    <item>
      <title>How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288381#M87303</link>
      <description>&lt;P&gt;How to do the time conversion for 2017-04-14T13:52:21.000Z to an understandable format? Any one please tell me the Query. Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 16:21:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288381#M87303</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2017-05-11T16:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288382#M87304</link>
      <description>&lt;P&gt;Is there a particular format you wanted it in?&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 17:40:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288382#M87304</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2017-05-11T17:40:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288383#M87305</link>
      <description>&lt;P&gt;Try something like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[YOUR BASE SEARCH]
| eval newformat=strftime(strptime(yourtimefield,"Current format of date/time field"),"Format you want the date/time in") 
| table yourtimefield newformat
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;&lt;STRONG&gt;Example with current format and new format:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[YOUR BASE SEARCH]
| eval newformat=strftime(strptime(yourtimefield,"%H:%M:%S.%3q %Z %b %d %Y"),"%m/%d/%Y %p") 
| table yourtimefield newformat
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;To help determine your time format, see Date and Time Format Variables documentation: &lt;A href="http://docs.splunk.com/Documentation/Splunk/6.5.3/SearchReference/Commontimeformatvariables"&gt;http://docs.splunk.com/Documentation/Splunk/6.5.3/SearchReference/Commontimeformatvariables&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 18:00:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288383#M87305</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2017-05-11T18:00:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288384#M87306</link>
      <description>&lt;P&gt;Nothing particular I just want it in readable format.  What I am trying to do is put the start_date and end_table in the table chat.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:01:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288384#M87306</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2020-09-29T14:01:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288385#M87307</link>
      <description>&lt;P&gt;What I am trying to do is put the start_date and end_table(Readable format) in the table chat.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:01:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288385#M87307</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2020-09-29T14:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288386#M87308</link>
      <description>&lt;P&gt;So, to make sure I understand, you have 2 date/time fields: start_date and end_date, and you want to format them and put them in a table?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:01:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288386#M87308</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2020-09-29T14:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288387#M87309</link>
      <description>&lt;P&gt;Yes Exactly &lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 18:12:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288387#M87309</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2017-05-11T18:12:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288388#M87310</link>
      <description>&lt;P&gt;I am trying to show the Alert start and end date and time. &lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 18:14:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288388#M87310</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2017-05-11T18:14:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288389#M87311</link>
      <description>&lt;P&gt;In that case you would use the same method:&lt;/P&gt;

&lt;P&gt;[YOUR BASE SEARCH]&lt;BR /&gt;
 | eval start_time=strftime(strptime(startfield,"%H:%M:%S.%3q %Z %b %d %Y"),"%m/%d/%Y %p") &lt;BR /&gt;
| eval end_time=strftime(strptime(endfield,,"%H:%M:%S.%3q %Z %b %d %Y"),"%m/%d/%Y %p") &lt;BR /&gt;
 | table start_time end_time&lt;/P&gt;

&lt;P&gt;Again, replace the formats I am using with your current and desired format.  Does this help?&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:01:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288389#M87311</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2020-09-29T14:01:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288390#M87312</link>
      <description>&lt;P&gt;It is not working..Showing empty table with the field name(Start_time)&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 18:43:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288390#M87312</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2017-05-11T18:43:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288391#M87313</link>
      <description>&lt;P&gt;Are you replacing startfield and endfield with your fields, and have you changed the format in the strptime to the current format?&lt;/P&gt;</description>
      <pubDate>Thu, 11 May 2017 18:56:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288391#M87313</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2017-05-11T18:56:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288392#M87314</link>
      <description>&lt;P&gt;Like this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;... | foreach start_date end_table [ eval &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = strptime(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, "%Y/%m/%dT%H:%M:%S.%3q %Z") | fieldformat &amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt; = strftime(&amp;lt;&amp;lt;FIELD&amp;gt;&amp;gt;, "%m/%d/%Y %H:%M:%S") ] | table start_date end_table
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 11 May 2017 20:29:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288392#M87314</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-05-11T20:29:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288393#M87315</link>
      <description>&lt;P&gt;Not working..This are my field names alert_started_at  alert_ended_at.&lt;/P&gt;

&lt;P&gt;And I am trying to show the alert_started_at alert_ended_at   readable format in the table.&lt;/P&gt;

&lt;P&gt;Can you please help me with this one?&lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:03:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288393#M87315</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2020-09-29T14:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288394#M87316</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[YOUR BASE SEARCH]
| eval alert_started_at=strftime(strptime(alert_started_at,"%Y-%m-%dT%H:%M:%S.%3q%Z"),"%m/%d/%Y %p") 
| eval alert_ended_at=strftime(strptime(alert_ended_at,"%Y-%m-%dT%H:%M:%S.%3q%Z"),"%m/%d/%Y %p") 
| table alert_started_at alert_ended_at
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This will overwrite the original value of alert_started_at and alert_ended_at, so if you want to maintain that original values, you should change the fieldname before the equals to your new field name.  Also, the second date format is just an example, use the documentation link from my earlier answer to format the date the way you want it.&lt;/P&gt;

&lt;P&gt;The first format should work for your posted date format in your question.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:03:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288394#M87316</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2020-09-29T14:03:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288395#M87317</link>
      <description>&lt;P&gt;Old format :   2017-05-12T13:34:31.000Z&lt;/P&gt;

&lt;P&gt;New format(after applying)   : 04/12/2017 PM&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 14:06:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288395#M87317</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2017-05-12T14:06:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288396#M87318</link>
      <description>&lt;P&gt;What format would you like it to be in?&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 14:14:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288396#M87318</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2017-05-12T14:14:21Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288397#M87319</link>
      <description>&lt;P&gt;Like 04/12/2017 T %H:%M:%S PM %Z&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 14:19:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288397#M87319</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2017-05-12T14:19:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288398#M87320</link>
      <description>&lt;P&gt;Change the second format in each eval statement to:&lt;/P&gt;

&lt;P&gt;%m/%d/%Y T %H:%M:%S %Z&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 14:22:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288398#M87320</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2017-05-12T14:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288399#M87321</link>
      <description>&lt;P&gt;Worked Thanks!&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 14:26:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288399#M87321</guid>
      <dc:creator>dchalasani</dc:creator>
      <dc:date>2017-05-12T14:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to do the time conversion for 2017-04-14T13:52:21.000Z to a readable format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288400#M87322</link>
      <description>&lt;P&gt;Great!  Glad I could help.&lt;/P&gt;</description>
      <pubDate>Fri, 12 May 2017 14:27:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-do-the-time-conversion-for-2017-04-14T13-52-21-000Z-to-a/m-p/288400#M87322</guid>
      <dc:creator>kmorris_splunk</dc:creator>
      <dc:date>2017-05-12T14:27:53Z</dc:date>
    </item>
  </channel>
</rss>

