<?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 get last login from multiple date  ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-last-login-from-multiple-date/m-p/628799#M218425</link>
    <description>&lt;P&gt;after i tried change coloumn _time, its still work. thx&lt;/P&gt;</description>
    <pubDate>Mon, 30 Jan 2023 08:06:04 GMT</pubDate>
    <dc:creator>riposan</dc:creator>
    <dc:date>2023-01-30T08:06:04Z</dc:date>
    <item>
      <title>How to get last login from multiple date  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-last-login-from-multiple-date/m-p/628780#M218413</link>
      <description>&lt;P&gt;please help,i used _time from date log, and i using time from windowstime, but i tried substraction bot of them not result in coloumn durationday&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;stats max(_time) as lastlogin by user |eval n=time()|eval today=strftime(n,"%m-%d-%Y %H:%M:%S.%Q")| eval durationday = lastlogin - today | table user,lastlogin,today,durationday&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and result this&lt;/P&gt;&lt;P&gt;user lastlogin today durationday&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;dsadadnk12&lt;/TD&gt;&lt;TD&gt;01-30-2023 11:10:27.208&lt;/TD&gt;&lt;TD&gt;01-30-2023 11:25:14.000&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 30 Jan 2023 04:34:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-last-login-from-multiple-date/m-p/628780#M218413</guid>
      <dc:creator>riposan</dc:creator>
      <dc:date>2023-01-30T04:34:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to get last login from multiple date  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-last-login-from-multiple-date/m-p/628783#M218416</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/253347"&gt;@riposan&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;You should calculate the duration before formatting the lastlogin. Please try below;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats max(_time) as lastlogin by user 
| eval n=time() 
| eval durationday = n-lastlogin 
| eval today=strftime(n,"%m-%d-%Y %H:%M:%S.%Q") 
| eval durationday= tostring(durationday,"duration") 
| table user,lastlogin,today,durationday&lt;/LI-CODE&gt;</description>
      <pubDate>Mon, 30 Jan 2023 06:03:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-last-login-from-multiple-date/m-p/628783#M218416</guid>
      <dc:creator>scelikok</dc:creator>
      <dc:date>2023-01-30T06:03:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get last login from multiple date  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-last-login-from-multiple-date/m-p/628787#M218419</link>
      <description>&lt;P&gt;thx for reply my question. i tried this,still no result in coloumn durationday&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 06:59:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-last-login-from-multiple-date/m-p/628787#M218419</guid>
      <dc:creator>riposan</dc:creator>
      <dc:date>2023-01-30T06:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to get last login from multiple date  ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-get-last-login-from-multiple-date/m-p/628799#M218425</link>
      <description>&lt;P&gt;after i tried change coloumn _time, its still work. thx&lt;/P&gt;</description>
      <pubDate>Mon, 30 Jan 2023 08:06:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-get-last-login-from-multiple-date/m-p/628799#M218425</guid>
      <dc:creator>riposan</dc:creator>
      <dc:date>2023-01-30T08:06:04Z</dc:date>
    </item>
  </channel>
</rss>

