<?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 time field extraction in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/time-field-extraction/m-p/306688#M92015</link>
    <description>&lt;P&gt;How to extract the below data as time field, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2016-10-20 INFO ............................................................................ data|15 Feb '17| .............................
2016-10-20 INFO ............................................................................ data|16 Feb '17| .............................
2016-10-20 INFO ............................................................................ data|17 Feb '17| .............................
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Extracted the _time field but, I need to extract the time field (myfield).... &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;myfield,
15 Feb '17
16 Feb '17
17 Feb '17
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How to convert myfield to timestamp ? &lt;/P&gt;</description>
    <pubDate>Thu, 16 Feb 2017 21:15:40 GMT</pubDate>
    <dc:creator>krishnarajb2304</dc:creator>
    <dc:date>2017-02-16T21:15:40Z</dc:date>
    <item>
      <title>time field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-field-extraction/m-p/306688#M92015</link>
      <description>&lt;P&gt;How to extract the below data as time field, &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;2016-10-20 INFO ............................................................................ data|15 Feb '17| .............................
2016-10-20 INFO ............................................................................ data|16 Feb '17| .............................
2016-10-20 INFO ............................................................................ data|17 Feb '17| .............................
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Extracted the _time field but, I need to extract the time field (myfield).... &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;myfield,
15 Feb '17
16 Feb '17
17 Feb '17
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;How to convert myfield to timestamp ? &lt;/P&gt;</description>
      <pubDate>Thu, 16 Feb 2017 21:15:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-field-extraction/m-p/306688#M92015</guid>
      <dc:creator>krishnarajb2304</dc:creator>
      <dc:date>2017-02-16T21:15:40Z</dc:date>
    </item>
    <item>
      <title>Re: time field extraction</title>
      <link>https://community.splunk.com/t5/Splunk-Search/time-field-extraction/m-p/306689#M92016</link>
      <description>&lt;P&gt;myfield is the string, epochvalue will have the epoch time. format will be &lt;CODE&gt;%d %b '%y&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;your base search, | eval epochvalue=strptime(myfield,"%d %b '%y")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Read further on date variables &amp;amp; strptime &lt;A href="https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Commontimeformatvariables"&gt;https://docs.splunk.com/Documentation/Splunk/6.5.2/SearchReference/Commontimeformatvariables&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Sample:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|stats c | eval myfield="15 Feb '17" | eval epochvalue=strptime(myfield,"%d %b '%y")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Feb 2017 21:19:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/time-field-extraction/m-p/306689#M92016</guid>
      <dc:creator>vasanthmss</dc:creator>
      <dc:date>2017-02-16T21:19:16Z</dc:date>
    </item>
  </channel>
</rss>

