<?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 Convert timestamp from BST to EDT in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Convert-timestamp-from-BST-to-EDT/m-p/382251#M68917</link>
    <description>&lt;P&gt;My approach was to subtract 5 hours (18000 seconds) from the timestamp but when using the below line I get no results.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval timestamp =  timestamp - 18000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Full Query without subtraction&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=duo extracted_eventtype=authentication integration="Microsoft RDP" username=*
| eval Time=strftime(timestamp, "%H:%M") 
| eval day=strftime(timestamp, "%Y-%m-%d") 
| stats earliest(Time) by day, username  
| rename earliest(Time) as LogonTime 
| table username, day, LogonTime  
| sort username
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I included the timestamp in the table to show its format. &lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5192iB66D82F682ADCD44/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Jun 2018 09:13:22 GMT</pubDate>
    <dc:creator>davidcraven02</dc:creator>
    <dc:date>2018-06-13T09:13:22Z</dc:date>
    <item>
      <title>Convert timestamp from BST to EDT</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Convert-timestamp-from-BST-to-EDT/m-p/382251#M68917</link>
      <description>&lt;P&gt;My approach was to subtract 5 hours (18000 seconds) from the timestamp but when using the below line I get no results.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval timestamp =  timestamp - 18000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Full Query without subtraction&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=duo extracted_eventtype=authentication integration="Microsoft RDP" username=*
| eval Time=strftime(timestamp, "%H:%M") 
| eval day=strftime(timestamp, "%Y-%m-%d") 
| stats earliest(Time) by day, username  
| rename earliest(Time) as LogonTime 
| table username, day, LogonTime  
| sort username
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;I included the timestamp in the table to show its format. &lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/5192iB66D82F682ADCD44/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 09:13:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Convert-timestamp-from-BST-to-EDT/m-p/382251#M68917</guid>
      <dc:creator>davidcraven02</dc:creator>
      <dc:date>2018-06-13T09:13:22Z</dc:date>
    </item>
    <item>
      <title>Re: Convert timestamp from BST to EDT</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Convert-timestamp-from-BST-to-EDT/m-p/382252#M68918</link>
      <description>&lt;P&gt;Try the substraction with the original time fields "_time" or convert it using &lt;CODE&gt;strptime&lt;/CODE&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;     | eval BST_Time= _time - 18000
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;or use the &lt;CODE&gt;relative_time&lt;/CODE&gt; function&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|eval BST_Time=relative_time(_time,"-5h") 
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Jun 2018 09:28:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Convert-timestamp-from-BST-to-EDT/m-p/382252#M68918</guid>
      <dc:creator>renjith_nair</dc:creator>
      <dc:date>2018-06-13T09:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: Convert timestamp from BST to EDT</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Convert-timestamp-from-BST-to-EDT/m-p/382253#M68919</link>
      <description>&lt;P&gt;Thank you this worked.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 10:39:51 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Convert-timestamp-from-BST-to-EDT/m-p/382253#M68919</guid>
      <dc:creator>davidcraven02</dc:creator>
      <dc:date>2018-06-13T10:39:51Z</dc:date>
    </item>
  </channel>
</rss>

