<?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: timeformat for AM/PM in MKTime in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72553#M180968</link>
    <description>&lt;P&gt;This syntax works on my Splunk ver. 4.2.2 and converts 24 to 12 hours using %I instead of %H&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;%Y-%m-%d %I:%M%P
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;example &lt;/P&gt;

&lt;P&gt;2012-02-01 05:47pm&lt;/P&gt;</description>
    <pubDate>Thu, 02 Feb 2012 08:32:28 GMT</pubDate>
    <dc:creator>alemin</dc:creator>
    <dc:date>2012-02-02T08:32:28Z</dc:date>
    <item>
      <title>timeformat for AM/PM in MKTime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72549#M180964</link>
      <description>&lt;P&gt;What is the timeformat symbol to specify that AM/PM is included in the string? 
%P appears to work, but results show a difference when the 2 times are exactly the same. PM is simply being stripped instead of adding 12 hours.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="WinEventLog:*" |eval time=_time|convert timeformat="%m/%d/%Y %H:%M:%S %P" MkTime(WinEventDate) as wtime|eval diff=wtime-time |where diff&amp;lt;0 |Convert ctime(time) as ctime |fields host, diff, WinEventDate, ctime, time, wtime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2010 04:33:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72549#M180964</guid>
      <dc:creator>rgcox1</dc:creator>
      <dc:date>2010-10-19T04:33:54Z</dc:date>
    </item>
    <item>
      <title>Re: timeformat for AM/PM in MKTime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72550#M180965</link>
      <description>&lt;P&gt;Open Group's publication says %p (not sure if lower case matters). &lt;/P&gt;

&lt;P&gt;&lt;A href="http://www.opengroup.org/onlinepubs/009695399/functions/strptime.html" rel="nofollow"&gt;http://www.opengroup.org/onlinepubs/009695399/functions/strptime.html&lt;/A&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;%p    The locale's equivalent of a.m or p.m.
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Can you post an example event that you are having problems with?&lt;/P&gt;</description>
      <pubDate>Tue, 19 Oct 2010 10:16:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72550#M180965</guid>
      <dc:creator>araitz</dc:creator>
      <dc:date>2010-10-19T10:16:24Z</dc:date>
    </item>
    <item>
      <title>Re: timeformat for AM/PM in MKTime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72551#M180966</link>
      <description>&lt;P&gt;Example:&lt;BR /&gt;&lt;BR /&gt;
10/18/10 08:08:30 PM&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2010 04:01:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72551#M180966</guid>
      <dc:creator>rgcox1</dc:creator>
      <dc:date>2010-10-21T04:01:03Z</dc:date>
    </item>
    <item>
      <title>Re: timeformat for AM/PM in MKTime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72552#M180967</link>
      <description>&lt;P&gt;Good reference. Thought it might be that I was using an upper case H, but tried all variations of UC and LC H with any parameter related to a 12 hour clock. UC H and UC or LC p are the only ones that returned any result, and they always ignore PM.&lt;/P&gt;</description>
      <pubDate>Thu, 21 Oct 2010 04:01:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72552#M180967</guid>
      <dc:creator>rgcox1</dc:creator>
      <dc:date>2010-10-21T04:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: timeformat for AM/PM in MKTime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72553#M180968</link>
      <description>&lt;P&gt;This syntax works on my Splunk ver. 4.2.2 and converts 24 to 12 hours using %I instead of %H&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;%Y-%m-%d %I:%M%P
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;example &lt;/P&gt;

&lt;P&gt;2012-02-01 05:47pm&lt;/P&gt;</description>
      <pubDate>Thu, 02 Feb 2012 08:32:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72553#M180968</guid>
      <dc:creator>alemin</dc:creator>
      <dc:date>2012-02-02T08:32:28Z</dc:date>
    </item>
    <item>
      <title>Re: timeformat for AM/PM in MKTime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72554#M180969</link>
      <description>&lt;P&gt;Here is a Splunk Reference Guide: &lt;A href="http://docs.splunk.com/images/1/17/4.2.x_search_language_refcard.pdf"&gt;http://docs.splunk.com/images/1/17/4.2.x_search_language_refcard.pdf&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;This has a number of wonderfully useful things, the past page devoted to REGEX and Splunk STRPTIME formats.&lt;/P&gt;</description>
      <pubDate>Thu, 13 Sep 2012 20:27:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72554#M180969</guid>
      <dc:creator>jluste</dc:creator>
      <dc:date>2012-09-13T20:27:50Z</dc:date>
    </item>
    <item>
      <title>Re: timeformat for AM/PM in MKTime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72555#M180970</link>
      <description>&lt;P&gt;Any answer on this? I am having the same issue with 5:18:30 PM showing as 05:18:30 with the following search:&lt;/P&gt;

&lt;P&gt;eval time=strftime(round(strptime(full_Time, "%H:%M:%S %p")), "%H:%M:%S") &lt;/P&gt;</description>
      <pubDate>Mon, 24 Jul 2017 20:51:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72555#M180970</guid>
      <dc:creator>griffinpair</dc:creator>
      <dc:date>2017-07-24T20:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: timeformat for AM/PM in MKTime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72556#M180971</link>
      <description>&lt;P&gt;%I designates the hour for 12-hr timing format and %H designates the hour for 24-hr timing format. %P needs to be at the end to pick up the am/pm string at the end.&lt;/P&gt;

&lt;P&gt;If using a 12-HR time format, 08:08:30 PM would be:&lt;/P&gt;

&lt;P&gt;"%I:%M:%S %P"&lt;/P&gt;

&lt;P&gt;If using a 24-HR time format, 20:08:30 PM would be:&lt;/P&gt;

&lt;P&gt;"%H:%M:%S %P"&lt;/P&gt;</description>
      <pubDate>Tue, 25 Jul 2017 14:22:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72556#M180971</guid>
      <dc:creator>griffinpair</dc:creator>
      <dc:date>2017-07-25T14:22:04Z</dc:date>
    </item>
    <item>
      <title>Re: timeformat for AM/PM in MKTime</title>
      <link>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72557#M180972</link>
      <description>&lt;P&gt;When the filed type is string with AM/PM Format&lt;/P&gt;

&lt;P&gt;This Solution work for me :&lt;BR /&gt;
strftime(strptime(replace(FirstDepositDate,substr(FirstDepositDate,-2),""),"%m/%d/%Y"),"%m/%d/%Y"),&lt;/P&gt;</description>
      <pubDate>Thu, 31 Aug 2017 12:33:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/timeformat-for-AM-PM-in-MKTime/m-p/72557#M180972</guid>
      <dc:creator>liadal</dc:creator>
      <dc:date>2017-08-31T12:33:05Z</dc:date>
    </item>
  </channel>
</rss>

