<?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 convert _time column to epoch time in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451571#M127884</link>
    <description>&lt;P&gt;One thing I forgot is _time actually is already in epoch but just displayed human readable in Splunk UI. All you would need is &lt;CODE&gt;| eval epoch1=_time&lt;/CODE&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 01:04:27 GMT</pubDate>
    <dc:creator>mdsnmss</dc:creator>
    <dc:date>2020-09-30T01:04:27Z</dc:date>
    <item>
      <title>How to convert _time column to epoch time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451567#M127880</link>
      <description>&lt;P&gt;I need to convert the _time to epoch time. How is this done? Here is my time format and my cell is "_time".&lt;BR /&gt;
I have tried in the search box the following line.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval epoch1=strptime(_time,"%m/%d/%y %I:%M:%N %p")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;_time&lt;/P&gt;

&lt;P&gt;6/27/19&lt;BR /&gt;
2:29:09.000 PM&lt;/P&gt;

&lt;P&gt;6/27/19&lt;BR /&gt;
3:29:09.000 PM&lt;/P&gt;

&lt;P&gt;6/27/19&lt;BR /&gt;
5:29:09.000 PM&lt;/P&gt;

&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:07:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451567#M127880</guid>
      <dc:creator>Becherer</dc:creator>
      <dc:date>2020-09-30T01:07:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert _time column to epoch time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451568#M127881</link>
      <description>&lt;P&gt;| eval epoch1=_time&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 20:06:11 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451568#M127881</guid>
      <dc:creator>mdsnmss</dc:creator>
      <dc:date>2019-06-27T20:06:11Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert _time column to epoch time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451569#M127882</link>
      <description>&lt;P&gt;@mdsnmss &lt;/P&gt;

&lt;P&gt;I tried that but it still is showing the same. Do I need to change the %s?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 20:10:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451569#M127882</guid>
      <dc:creator>Becherer</dc:creator>
      <dc:date>2019-06-27T20:10:55Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert _time column to epoch time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451570#M127883</link>
      <description>&lt;P&gt;You are trying to get the field _time itself to display epoch? What is the full search? I don't believe you can actually overwrite _time so have to use the other field to display epoch.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 20:15:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451570#M127883</guid>
      <dc:creator>mdsnmss</dc:creator>
      <dc:date>2019-06-27T20:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert _time column to epoch time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451571#M127884</link>
      <description>&lt;P&gt;One thing I forgot is _time actually is already in epoch but just displayed human readable in Splunk UI. All you would need is &lt;CODE&gt;| eval epoch1=_time&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:04:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451571#M127884</guid>
      <dc:creator>mdsnmss</dc:creator>
      <dc:date>2020-09-30T01:04:27Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert _time column to epoch time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451572#M127885</link>
      <description>&lt;P&gt;I have tried both but cant seem to change the field. could I display the epoch time in a differet column?&lt;/P&gt;

&lt;P&gt;index=EventEndpoint&lt;BR /&gt;
| eval date=strftime(date,"%c")&lt;/P&gt;

&lt;P&gt;And&lt;/P&gt;

&lt;P&gt;index=EventEndpoint&lt;BR /&gt;
| eval epoch1=_time&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 20:26:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451572#M127885</guid>
      <dc:creator>Becherer</dc:creator>
      <dc:date>2019-06-27T20:26:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert _time column to epoch time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451573#M127886</link>
      <description>&lt;P&gt;@mdsnmss &lt;/P&gt;

&lt;P&gt;I have tried both but cant seem to change the field. could I display the epoch time in a differet column?&lt;/P&gt;

&lt;P&gt;index=EventEndpoint&lt;BR /&gt;
| eval date=strftime(date,"%c")&lt;/P&gt;

&lt;P&gt;And&lt;/P&gt;

&lt;P&gt;index=EventEndpoint&lt;BR /&gt;
| eval epoch1=_time&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 20:26:23 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451573#M127886</guid>
      <dc:creator>Becherer</dc:creator>
      <dc:date>2019-06-27T20:26:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert _time column to epoch time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451574#M127887</link>
      <description>&lt;P&gt;What are you using to display the data? Those base searches will only return raw results and not a stats/visualization. &lt;CODE&gt;index=EventEndpoint | eval date=_time | table date _time&lt;/CODE&gt; will show you the time in both epoch and human readable time.&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 20:30:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451574#M127887</guid>
      <dc:creator>mdsnmss</dc:creator>
      <dc:date>2019-06-27T20:30:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert _time column to epoch time</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451575#M127888</link>
      <description>&lt;P&gt;HI &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/177079"&gt;@Becherer&lt;/a&gt; ,&lt;/P&gt;

&lt;P&gt;&lt;CODE&gt;_time&lt;/CODE&gt; is always stored in the Splunk indexes as an epoch time value.  When you use &lt;CODE&gt;_time&lt;/CODE&gt; in a search, Splunk assumes you want to see a human-readable time value, instead of an epoch time number of seconds.  It also assumes that you want to see this human readable time value in the current time zone of the user account that is currently logged in.&lt;/P&gt;

&lt;P&gt;If you want to see the actual epoch time value, you can use eval to create an epoch time representation instead:&lt;BR /&gt;
&lt;PRE&gt; | eval time_epoch = strftime(_time, "%s")&lt;/PRE&gt;&lt;/P&gt;

&lt;P&gt;As &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/171209"&gt;@mdsnmss&lt;/a&gt; suggested, you could also do &lt;BR /&gt;
&lt;PRE&gt; | eval epoch1 = _time&lt;/PRE&gt;&lt;BR /&gt;
Which also works, because Splunk only makes the human readable assumption for _time, and anything else that you set to _time will be a epoch time value.&lt;/P&gt;

&lt;P&gt;I hope this helps.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:04:35 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-convert-time-column-to-epoch-time/m-p/451575#M127888</guid>
      <dc:creator>jnudell_2</dc:creator>
      <dc:date>2020-09-30T01:04:35Z</dc:date>
    </item>
  </channel>
</rss>

