<?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: Trying to extract timestamp from json field in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-extract-timestamp-from-json-field/m-p/507323#M86330</link>
    <description />
    <pubDate>Sat, 04 Jul 2020 07:44:39 GMT</pubDate>
    <dc:creator>to4kawa</dc:creator>
    <dc:date>2020-07-04T07:44:39Z</dc:date>
    <item>
      <title>Trying to extract timestamp from json field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-extract-timestamp-from-json-field/m-p/490449#M83843</link>
      <description>&lt;P&gt;One of the fields being indexed is formatted xx-xx-xxxxx_xx_xx-xx-20ww04c and various other strings always ending with year, week of the year and version, ie a=1, b=2, c=3. &lt;/P&gt;

&lt;P&gt;I'm testing this through the Add Data UI which has the Advanced options to provide Timestamp format, Timestamp prefix, and Lookahead. &lt;/P&gt;

&lt;P&gt;I'm trying these for the first two values, but it's obviously not correct:&lt;/P&gt;

&lt;P&gt;Timestamp format: %yww%Vc&lt;BR /&gt;
Timestamp prefix: (?&amp;lt;_time&amp;gt;\w{7})$&lt;/P&gt;

&lt;P&gt;Thanks for any help&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 03:47:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Trying-to-extract-timestamp-from-json-field/m-p/490449#M83843</guid>
      <dc:creator>cblanton</dc:creator>
      <dc:date>2020-09-30T03:47:49Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to extract timestamp from json field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-extract-timestamp-from-json-field/m-p/490450#M83844</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;| makeresults
| eval time=strftime(_time,"%yww%Vc")
| fieldformat _time=strftime(_time,"%yww%Vc")
| eval check=strptime(time,"%yww%Vc")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;wow, It can't be extracted. &lt;BR /&gt;
&lt;CODE&gt;| noop search_optimization=false&lt;/CODE&gt; it can't work.&lt;/P&gt;</description>
      <pubDate>Thu, 23 Jan 2020 12:25:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Trying-to-extract-timestamp-from-json-field/m-p/490450#M83844</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-01-23T12:25:22Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to extract timestamp from json field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-extract-timestamp-from-json-field/m-p/507295#M86320</link>
      <description>&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am able to get at search time what I want but unable to achieve at index time&lt;/P&gt;&lt;P&gt;My timestamp in data looks like:&amp;nbsp;&lt;SPAN class="field-val"&gt;2020-07-02T18:00:18+02:00 with name log_modified_date.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;i have written below props.conf:&lt;/P&gt;&lt;P&gt;[_json]&lt;BR /&gt;INDEXED_EXTRACTIONS = json&lt;BR /&gt;KV_MODE = none&lt;BR /&gt;AUTO_KV_JSON = false&lt;BR /&gt;NO_BINARY_CHECK = true&lt;BR /&gt;SHOULD_LINEMERGE = false&lt;BR /&gt;TIMESTAMP_FIELDS = last_modified_date&lt;BR /&gt;TIME_FORMAT = %Y-%m-%dT%H:%M:%S+%2N:%2N&lt;BR /&gt;MAX_TIMESTAMP_LOOKAHEAD = 25&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and getting time extracted as :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;7/2/20&lt;BR /&gt;6:00:18.020 PM &lt;/SPAN&gt;&lt;BR /&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want the time field extracted in same way as in data with + value as well like:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;SPAN&gt;7/2/20&lt;BR /&gt;6:00:18+02:00 PM&amp;nbsp; &amp;nbsp; something like this&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Please let me know what i am doing wrong as i am not getting expected output.&lt;/P&gt;</description>
      <pubDate>Fri, 03 Jul 2020 19:48:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Trying-to-extract-timestamp-from-json-field/m-p/507295#M86320</guid>
      <dc:creator>abhinav_bel</dc:creator>
      <dc:date>2020-07-03T19:48:56Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to extract timestamp from json field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-extract-timestamp-from-json-field/m-p/507306#M86324</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jul 2020 07:44:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Trying-to-extract-timestamp-from-json-field/m-p/507306#M86324</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-07-04T07:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to extract timestamp from json field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-extract-timestamp-from-json-field/m-p/507321#M86328</link>
      <description>&lt;P&gt;This timeformat will not work , with adding %：z it will just convert time as per timezone .&lt;/P&gt;&lt;P&gt;I hv already tried what you suggested.&lt;/P&gt;&lt;P&gt;As i said i want time as it is with + value mentioned.&lt;/P&gt;&lt;P&gt;Note +02：00 is fixed with each timestamp in events.&lt;/P&gt;&lt;P&gt;So in case if we can’t get in timeformat ,can we add explicitly at index time.&lt;/P&gt;&lt;P&gt;Pls suggest.&lt;/P&gt;&lt;P&gt;And i have to use time format because there is 1 more time field in data which splunk detecting automatically.&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jul 2020 03:25:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Trying-to-extract-timestamp-from-json-field/m-p/507321#M86328</guid>
      <dc:creator>abhinav_bel</dc:creator>
      <dc:date>2020-07-04T03:25:53Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to extract timestamp from json field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-extract-timestamp-from-json-field/m-p/507323#M86330</link>
      <description />
      <pubDate>Sat, 04 Jul 2020 07:44:39 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Trying-to-extract-timestamp-from-json-field/m-p/507323#M86330</guid>
      <dc:creator>to4kawa</dc:creator>
      <dc:date>2020-07-04T07:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to extract timestamp from json field</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Trying-to-extract-timestamp-from-json-field/m-p/507327#M86334</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/184221"&gt;@to4kawa&lt;/a&gt;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;is 2020-07-02T18:02:18 ? - No it doesn't mean&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I want +02:00 value separately only along with time:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;7/2/20&lt;BR /&gt;6:00:44+02:00 PM&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/STRONG&gt;like this i want in _time.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please help me getting this and as I told earlier that +02:00 value is fixed with each timestamp so you can leverage of adding hardcore as well, i won't mind just output should be same.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Jul 2020 05:12:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Trying-to-extract-timestamp-from-json-field/m-p/507327#M86334</guid>
      <dc:creator>abhinav_bel</dc:creator>
      <dc:date>2020-07-04T05:12:30Z</dc:date>
    </item>
  </channel>
</rss>

