<?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: Time format in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Time-format/m-p/564658#M196691</link>
    <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/180715"&gt;@shugup2923&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;You can use replace function.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval time=if(like(time, "%:00%"), time, replace(replace(time, "AM", ":00AM"), "PM", ":00PM"))&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 25 Aug 2021 08:52:54 GMT</pubDate>
    <dc:creator>manjunathmeti</dc:creator>
    <dc:date>2021-08-25T08:52:54Z</dc:date>
    <item>
      <title>Time format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-format/m-p/564656#M196689</link>
      <description>&lt;P&gt;I have time field which have values such as 9AM-10PM, 10:00AM-11:00PM, I want to change 9AM-10PM to 9:00AM-10:00 PM, to normalize field in sameformat.&lt;BR /&gt;&lt;BR /&gt;I tired strftime(strptime(time_field,"%H%p-%H%p"),"%H:%M%p-%H%:%M%p")&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;But its not working, I also tried convert() and fieldformat but no luck. Any idea how can I achieve this ?&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 08:36:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-format/m-p/564656#M196689</guid>
      <dc:creator>shugup2923</dc:creator>
      <dc:date>2021-08-25T08:36:05Z</dc:date>
    </item>
    <item>
      <title>Re: Time format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-format/m-p/564658#M196691</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/180715"&gt;@shugup2923&lt;/a&gt;,&lt;BR /&gt;&lt;BR /&gt;You can use replace function.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval time=if(like(time, "%:00%"), time, replace(replace(time, "AM", ":00AM"), "PM", ":00PM"))&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 25 Aug 2021 08:52:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-format/m-p/564658#M196691</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-08-25T08:52:54Z</dc:date>
    </item>
    <item>
      <title>Re: Time format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-format/m-p/564665#M196694</link>
      <description>&lt;P&gt;Perfect this worked, just I did small modification - used match instead of like as there are some other values as well. Approach is very useful&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 09:25:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-format/m-p/564665#M196694</guid>
      <dc:creator>shugup2923</dc:creator>
      <dc:date>2021-08-25T09:25:51Z</dc:date>
    </item>
    <item>
      <title>Re: Time format</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Time-format/m-p/564667#M196695</link>
      <description>&lt;P&gt;| eval timing=case(Match(timing, "\d*:\d*\w*-\d*:\d*\w*"), timing,Match(timing, "\d*:\d*\w*-\d*\w*"), replace(timing,"PM",":00PM"),Match(timing, "\d*\w*-\d*:\d*\w*"), replace(timing,"AM",":00AM"),true(), replace(replace(timing, "AM", ":00AM"), "PM", ":00PM"))&lt;/P&gt;</description>
      <pubDate>Wed, 25 Aug 2021 09:31:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Time-format/m-p/564667#M196695</guid>
      <dc:creator>shugup2923</dc:creator>
      <dc:date>2021-08-25T09:31:36Z</dc:date>
    </item>
  </channel>
</rss>

