<?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 get epoch time from string time example from 20090930 to epoch time? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/get-epoch-time-from-string-time-example-from-20090930-to-epoch/m-p/181432#M186864</link>
    <description>&lt;P&gt;get epoch time from string time example from 20090930 to epoch time?&lt;/P&gt;</description>
    <pubDate>Thu, 23 Oct 2014 09:10:36 GMT</pubDate>
    <dc:creator>srinathd</dc:creator>
    <dc:date>2014-10-23T09:10:36Z</dc:date>
    <item>
      <title>get epoch time from string time example from 20090930 to epoch time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-epoch-time-from-string-time-example-from-20090930-to-epoch/m-p/181432#M186864</link>
      <description>&lt;P&gt;get epoch time from string time example from 20090930 to epoch time?&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2014 09:10:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-epoch-time-from-string-time-example-from-20090930-to-epoch/m-p/181432#M186864</guid>
      <dc:creator>srinathd</dc:creator>
      <dc:date>2014-10-23T09:10:36Z</dc:date>
    </item>
    <item>
      <title>Re: get epoch time from string time example from 20090930 to epoch time?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/get-epoch-time-from-string-time-example-from-20090930-to-epoch/m-p/181433#M186865</link>
      <description>&lt;P&gt;Hi srinathd,&lt;/P&gt;

&lt;P&gt;based on your provided example try this run everywhere command:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal | head 1 | eval foo="20090930" | eval boo=strptime(foo, "%Y%m%d") | table foo, boo
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;where &lt;CODE&gt;boo&lt;/CODE&gt; will be the epoch time. You can verify it by running this search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal | head 1 | eval foo="20090930" | eval boo=strptime(foo, "%Y%m%d") | convert ctime(boo) AS newTime | table foo, boo, newTime
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;hope this helps ...&lt;/P&gt;

&lt;P&gt;cheers, MuS&lt;/P&gt;</description>
      <pubDate>Thu, 23 Oct 2014 09:42:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/get-epoch-time-from-string-time-example-from-20090930-to-epoch/m-p/181433#M186865</guid>
      <dc:creator>MuS</dc:creator>
      <dc:date>2014-10-23T09:42:33Z</dc:date>
    </item>
  </channel>
</rss>

