<?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 How can I convert it to splunk time format? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-convert-it-to-splunk-time-format/m-p/623553#M216761</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a field in the logs like below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;2022-12-07T08:40:14.253180536&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I convert it to splunk time format?&lt;/P&gt;
&lt;P&gt;I need to eventually select this field in the table, so the conversion should work within stats&lt;/P&gt;</description>
    <pubDate>Wed, 07 Dec 2022 15:55:03 GMT</pubDate>
    <dc:creator>ajayrathore</dc:creator>
    <dc:date>2022-12-07T15:55:03Z</dc:date>
    <item>
      <title>How can I convert it to splunk time format?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-convert-it-to-splunk-time-format/m-p/623553#M216761</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;I have a field in the logs like below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="python"&gt;2022-12-07T08:40:14.253180536&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I convert it to splunk time format?&lt;/P&gt;
&lt;P&gt;I need to eventually select this field in the table, so the conversion should work within stats&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 15:55:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-convert-it-to-splunk-time-format/m-p/623553#M216761</guid>
      <dc:creator>ajayrathore</dc:creator>
      <dc:date>2022-12-07T15:55:03Z</dc:date>
    </item>
    <item>
      <title>Re: Time conversion</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-can-I-convert-it-to-splunk-time-format/m-p/623562#M216766</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/251899"&gt;@ajayrathore&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;what do you mean with "&lt;SPAN&gt;splunk time format"?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if you mean _time (that's epochtime) you can use the strptime function in the eval command&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval new_time=strptime(your_time, "%Y-%m-%dT%H:%M:%S.9%N")&lt;/LI-CODE&gt;&lt;P&gt;if instead you're speaking of the time format when a log is acquired and indexed, you have to put in props.conf for that sourcetype:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;TIME_FORMAT = %Y-%m-%dT%H:%M:%S.9%N&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 07 Dec 2022 12:08:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-can-I-convert-it-to-splunk-time-format/m-p/623562#M216766</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2022-12-07T12:08:20Z</dc:date>
    </item>
  </channel>
</rss>

