<?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 convert the time format to UK and 24 hour time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442563#M125612</link>
    <description>&lt;P&gt;I have the same question but I want this to be applicable to all the dasboard/reports/alerts/visualizations. Is there global settings at an 'application' level that will default it to UTC 24 hour rather than making changes for each individual panel?&lt;/P&gt;</description>
    <pubDate>Sat, 07 Mar 2020 17:39:07 GMT</pubDate>
    <dc:creator>joshi_rajesh</dc:creator>
    <dc:date>2020-03-07T17:39:07Z</dc:date>
    <item>
      <title>How to convert the time format to UK and 24 hour time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442556#M125605</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have a field called in_time with example output = 8/31/2018 10:21:59 PM (GMT)&lt;/P&gt;

&lt;P&gt;I'd like this time (e.g. out_time) to be extracted and converted to read 31/08/2018 22:21:59&lt;/P&gt;

&lt;P&gt;Can you help?&lt;/P&gt;

&lt;P&gt;Many Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 10:13:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442556#M125605</guid>
      <dc:creator>aherrington</dc:creator>
      <dc:date>2018-09-04T10:13:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert the time format to UK and 24 hour time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442557#M125606</link>
      <description>&lt;P&gt;I also have times in format 31 August 2018 22:21 - can this be converted to 31/08/2018 22:21?&lt;/P&gt;

&lt;P&gt;Many thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 11:35:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442557#M125606</guid>
      <dc:creator>aherrington</dc:creator>
      <dc:date>2018-09-04T11:35:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert the time format to UK and 24 hour time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442558#M125607</link>
      <description>&lt;P&gt;Take a look at the time and date functions for the eval command: &lt;A href="http://docs.splunk.com/Documentation/Splunk/7.0.1/SearchReference/DateandTimeFunctions"&gt;http://docs.splunk.com/Documentation/Splunk/7.0.1/SearchReference/DateandTimeFunctions&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;You can use &lt;CODE&gt;strptime&lt;/CODE&gt; to parse a string into a UNIX timestamp and then use &lt;CODE&gt;strftime&lt;/CODE&gt; to print it to a string again in your preferred format.&lt;/P&gt;

&lt;P&gt;Adjusting for timezone offsets can be done by adding the required number of seconds to the UNIX timestamp in between these 2 conversion steps.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 13:01:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442558#M125607</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-09-04T13:01:33Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert the time format to UK and 24 hour time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442559#M125608</link>
      <description>&lt;P&gt;eval unix_time=strptime(in_time, "%m/%d/%Y %H:%M:%S" | fields unix_time&lt;/P&gt;

&lt;P&gt;This is the command I have attempted  but it throws up an error&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:08:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442559#M125608</guid>
      <dc:creator>aherrington</dc:creator>
      <dc:date>2020-09-29T21:08:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert the time format to UK and 24 hour time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442560#M125609</link>
      <description>&lt;P&gt;What error?&lt;/P&gt;

&lt;P&gt;Also: you probably want to use &lt;CODE&gt;%I&lt;/CODE&gt; instead of &lt;CODE&gt;%H&lt;/CODE&gt; and add a %p for the AM/PM part.&lt;/P&gt;</description>
      <pubDate>Tue, 04 Sep 2018 13:18:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442560#M125609</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-09-04T13:18:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert the time format to UK and 24 hour time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442561#M125610</link>
      <description>&lt;P&gt;Excellent I got it to work &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; - I added an hour to make it BST&lt;/P&gt;

&lt;P&gt;eval unix_time=strptime(in_time, "%m/%d/%Y %I:%M:%S %p") + 3600 | eval time_out=strftime(unix_time, "%d/%m/%Y %H:%M") | fields out_time&lt;/P&gt;

&lt;P&gt;Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 21:08:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442561#M125610</guid>
      <dc:creator>aherrington</dc:creator>
      <dc:date>2020-09-29T21:08:19Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert the time format to UK and 24 hour time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442562#M125611</link>
      <description>&lt;P&gt;If you don't need the unix_time for anything, you can also do it in one eval:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval time_out=strftime(strptime(in_time, "%m/%d/%Y %I:%M:%S %p") + 3600, "%d/%m/%Y %H:%M") | fields out_time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 04 Sep 2018 13:43:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442562#M125611</guid>
      <dc:creator>FrankVl</dc:creator>
      <dc:date>2018-09-04T13:43:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert the time format to UK and 24 hour time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442563#M125612</link>
      <description>&lt;P&gt;I have the same question but I want this to be applicable to all the dasboard/reports/alerts/visualizations. Is there global settings at an 'application' level that will default it to UTC 24 hour rather than making changes for each individual panel?&lt;/P&gt;</description>
      <pubDate>Sat, 07 Mar 2020 17:39:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442563#M125612</guid>
      <dc:creator>joshi_rajesh</dc:creator>
      <dc:date>2020-03-07T17:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert the time format to UK and 24 hour time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442564#M125613</link>
      <description>&lt;P&gt;@joshi_rajesh This question is almost 2 years old with an accepted answer so there's not likely to be many people looking at it.  You should post a new question explaining the problem you wish to resolve.&lt;/P&gt;</description>
      <pubDate>Sat, 07 Mar 2020 18:58:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-the-time-format-to-UK-and-24-hour-time/m-p/442564#M125613</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2020-03-07T18:58:13Z</dc:date>
    </item>
  </channel>
</rss>

