<?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 uniform format for timestamp? in Splunk Enterprise</title>
    <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-uniform-format-for-timestamp/m-p/592058#M12062</link>
    <description>&lt;P&gt;Where do these timestamps come from? It's a relatively rare situation that you need to use the timestamp from a different part of event than _time field if the event is properly parsed.&lt;/P&gt;&lt;P&gt;I'm not saying it doesn't happen but it's relatively rare.&lt;/P&gt;</description>
    <pubDate>Sat, 02 Apr 2022 10:45:22 GMT</pubDate>
    <dc:creator>PickleRick</dc:creator>
    <dc:date>2022-04-02T10:45:22Z</dc:date>
    <item>
      <title>How to uniform format for timestamp?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-uniform-format-for-timestamp/m-p/592004#M12059</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;after querying and grouping my data, my timestamp is of different format like&lt;/P&gt;
&lt;P class=""&gt;2021-01-20 07:22:34.545674&lt;/P&gt;
&lt;P class=""&gt;2020-02-18T11:03:44.543+0000&lt;/P&gt;
&lt;P class=""&gt;2021-01-25T11:05:33.003Z&lt;/P&gt;
&lt;P class=""&gt;2022-04-01 19:51:01.411826Z&lt;/P&gt;
&lt;P class=""&gt;2021-05-22 02:49:26.607839&lt;/P&gt;
&lt;P class=""&gt;How to have a uniform format for all the timestamp values in the stats table&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 01 Apr 2022 19:35:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-uniform-format-for-timestamp/m-p/592004#M12059</guid>
      <dc:creator>manimuthu</dc:creator>
      <dc:date>2022-04-01T19:35:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to uniform format for timestamp?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-uniform-format-for-timestamp/m-p/592039#M12061</link>
      <description>&lt;P&gt;It seems like your timestamps are coming as string values in some field (for example my_timestamp) You need to handle each date format and then combine everything with coalesce.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval time1=strptime(my_timestamp, "%F %T.%6N")
| eval time2=strptime(my_timestamp, "%FT%T.%3NZ")
....
| eval my_timestamp=coalesce(time1, time2, time3, ....)
| eval my_timestamp=strftime(my_timestamp, "%F %T")&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See date-time format parameters -&amp;nbsp;&lt;A href="https://docs.splunk.com/Documentation/Splunk/8.2.5/SearchReference/Commontimeformatvariables" target="_blank"&gt;https://docs.splunk.com/Documentation/Splunk/8.2.5/SearchReference/Commontimeformatvariables&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Apr 2022 06:21:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-uniform-format-for-timestamp/m-p/592039#M12061</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-04-02T06:21:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to uniform format for timestamp?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-uniform-format-for-timestamp/m-p/592058#M12062</link>
      <description>&lt;P&gt;Where do these timestamps come from? It's a relatively rare situation that you need to use the timestamp from a different part of event than _time field if the event is properly parsed.&lt;/P&gt;&lt;P&gt;I'm not saying it doesn't happen but it's relatively rare.&lt;/P&gt;</description>
      <pubDate>Sat, 02 Apr 2022 10:45:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-uniform-format-for-timestamp/m-p/592058#M12062</guid>
      <dc:creator>PickleRick</dc:creator>
      <dc:date>2022-04-02T10:45:22Z</dc:date>
    </item>
    <item>
      <title>Re: How to uniform format for timestamp?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-uniform-format-for-timestamp/m-p/592068#M12063</link>
      <description>&lt;P&gt;Thanks a lot for all the replies. Actually instead of using&amp;nbsp;&lt;SPAN&gt;timestamps that are coming as string values in some field, i used _time so, that helped me to avoid these different timestamp's formats issue.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Actually&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;| eval my_timestamp=strftime(my_timestamp, "%F %T")&lt;/PRE&gt;&lt;P&gt;this line helped me a lot . Really thanks for all who took their precious time and efforts to help me&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 02 Apr 2022 19:56:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-uniform-format-for-timestamp/m-p/592068#M12063</guid>
      <dc:creator>manimuthu</dc:creator>
      <dc:date>2022-04-02T19:56:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to uniform format for timestamp?</title>
      <link>https://community.splunk.com/t5/Splunk-Enterprise/How-to-uniform-format-for-timestamp/m-p/592087#M12064</link>
      <description>&lt;P&gt;If the answer helped you kindly consider accepting the answer!!!&lt;/P&gt;</description>
      <pubDate>Sun, 03 Apr 2022 15:28:37 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Enterprise/How-to-uniform-format-for-timestamp/m-p/592087#M12064</guid>
      <dc:creator>VatsalJagani</dc:creator>
      <dc:date>2022-04-03T15:28:37Z</dc:date>
    </item>
  </channel>
</rss>

