<?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: Issue with strptime in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/494094#M140192</link>
    <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval OpenedAt ="5/4/2019 9:04:46 PM" 
| eval new_time=strptime(OpenedAt,"%m/%d/%Y %I:%M:%S %p") 
| eval new_time2=strftime(new_time,"%m/%d/%Y %T")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;see reference.&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Commontimeformatvariables"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Commontimeformatvariables&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 06 May 2020 02:51:12 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-05-06T02:51:12Z</dc:date>
    <item>
      <title>Issue with strptime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/494092#M140190</link>
      <description>&lt;P&gt;I am trying to convert a date / time into 24 hour format using strptime. Here's the example:&lt;BR /&gt;
OpenedAt = 5/4/2019 9:04:46 PM&lt;/P&gt;

&lt;P&gt;I convert it to epoch using the following statement:&lt;BR /&gt;
&lt;STRONG&gt;eval new_time=strptime(OpenedAt,"%m/%d/%Y %H:%M:%S %p")&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;When I test it again, it still dosn't show in 24 hour format:&lt;BR /&gt;
&lt;STRONG&gt;eval new_time2=strftime(new_time,"%m/%d/%Y %T")&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;
05/04/2019 09:04:46&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 05:21:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/494092#M140190</guid>
      <dc:creator>sethinkbold</dc:creator>
      <dc:date>2020-09-30T05:21:53Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with strptime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/494093#M140191</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;

&lt;P&gt;Check this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval date="5/4/2019 9:04:46 PM",new_date=strftime(strptime(date,"%d/%m/%Y %I:%M:%S %p"),"%d/%m/%Y %H:%M:%S")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 May 2020 02:48:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/494093#M140191</guid>
      <dc:creator>vnravikumar</dc:creator>
      <dc:date>2020-05-06T02:48:26Z</dc:date>
    </item>
    <item>
      <title>Re: Issue with strptime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/494094#M140192</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval OpenedAt ="5/4/2019 9:04:46 PM" 
| eval new_time=strptime(OpenedAt,"%m/%d/%Y %I:%M:%S %p") 
| eval new_time2=strftime(new_time,"%m/%d/%Y %T")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;see reference.&lt;BR /&gt;
&lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Commontimeformatvariables"&gt;https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Commontimeformatvariables&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 06 May 2020 02:51:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Issue-with-strptime/m-p/494094#M140192</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-05-06T02:51:12Z</dc:date>
    </item>
  </channel>
</rss>

