<?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: Active Directory LastLogonTimestamp EVAL/WHERE Date Math in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Active-Directory-LastLogonTimestamp-EVAL-WHERE-Date-Math/m-p/184156#M53053</link>
    <description>&lt;P&gt;As a note I changed the %H to %I for 12-Hour time.  Otherwise perfect and thank you very much for the help.&lt;/P&gt;</description>
    <pubDate>Thu, 19 Dec 2013 14:36:58 GMT</pubDate>
    <dc:creator>mcrawford44</dc:creator>
    <dc:date>2013-12-19T14:36:58Z</dc:date>
    <item>
      <title>Active Directory LastLogonTimestamp EVAL/WHERE Date Math</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Active-Directory-LastLogonTimestamp-EVAL-WHERE-Date-Math/m-p/184153#M53050</link>
      <description>&lt;P&gt;I'm attempting to locate systems that have not logged into AD for 90 days.  I am using the following search;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo   | where lastLogonTimestamp&amp;lt;relative_time(now(), "-90d" )  | dedup cn  | table  cn,lastLogonTimestamp,operatingSystem
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;This does not appear to function.  It returns results, however the LastLogonTimestamp field appears to return ALL dates.  Reversing the query returns garbage results.  Every field returned says "OptionalProperties".&lt;/P&gt;

&lt;P&gt;If I recall, this variable is stored in some Microsoft tick time similar to epoch, however Splunk seems to display it properly in the following format;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;07:44.36 PM, Sun 11/17/2013
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Is Splunk automatically converting this?  Do I have to define a format in order to evaluate or use a where command?&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2013 20:43:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Active-Directory-LastLogonTimestamp-EVAL-WHERE-Date-Math/m-p/184153#M53050</guid>
      <dc:creator>mcrawford44</dc:creator>
      <dc:date>2013-12-18T20:43:41Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory LastLogonTimestamp EVAL/WHERE Date Math</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Active-Directory-LastLogonTimestamp-EVAL-WHERE-Date-Math/m-p/184154#M53051</link>
      <description>&lt;P&gt;Most likely you'll need to convert the &lt;CODE&gt;lastLogonTimestamp&lt;/CODE&gt; to &lt;CODE&gt;epoch&lt;/CODE&gt; before making the comparison.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=foo lastLogonTimestamp=* 
| eval last_logon = strptime(lastLogonTimestamp, "%H:%M.%S %p, %a %m/%d/%Y") 
| where last_logon &amp;lt; (now() - (86400 * 90)) 
| dedup cn 
| table cn, lastLogonTimestamp, operatingsystem
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;hope this helps,&lt;/P&gt;

&lt;P&gt;k&lt;/P&gt;</description>
      <pubDate>Wed, 18 Dec 2013 20:55:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Active-Directory-LastLogonTimestamp-EVAL-WHERE-Date-Math/m-p/184154#M53051</guid>
      <dc:creator>kristian_kolb</dc:creator>
      <dc:date>2013-12-18T20:55:10Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory LastLogonTimestamp EVAL/WHERE Date Math</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Active-Directory-LastLogonTimestamp-EVAL-WHERE-Date-Math/m-p/184155#M53052</link>
      <description>&lt;P&gt;Perfect!  Thank you.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 13:03:22 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Active-Directory-LastLogonTimestamp-EVAL-WHERE-Date-Math/m-p/184155#M53052</guid>
      <dc:creator>mcrawford44</dc:creator>
      <dc:date>2013-12-19T13:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory LastLogonTimestamp EVAL/WHERE Date Math</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Active-Directory-LastLogonTimestamp-EVAL-WHERE-Date-Math/m-p/184156#M53053</link>
      <description>&lt;P&gt;As a note I changed the %H to %I for 12-Hour time.  Otherwise perfect and thank you very much for the help.&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2013 14:36:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Active-Directory-LastLogonTimestamp-EVAL-WHERE-Date-Math/m-p/184156#M53053</guid>
      <dc:creator>mcrawford44</dc:creator>
      <dc:date>2013-12-19T14:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Active Directory LastLogonTimestamp EVAL/WHERE Date Math</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Active-Directory-LastLogonTimestamp-EVAL-WHERE-Date-Math/m-p/184157#M53054</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
I would like to sort by date.  If I use the command "sort -last_logon" , Splunk order by hours. Is it possible convert first to " %m/%d/%Y, %H:%M.%S %p"?&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
Lopes.&lt;/P&gt;</description>
      <pubDate>Mon, 18 Apr 2016 14:11:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Active-Directory-LastLogonTimestamp-EVAL-WHERE-Date-Math/m-p/184157#M53054</guid>
      <dc:creator>monteirolopes</dc:creator>
      <dc:date>2016-04-18T14:11:58Z</dc:date>
    </item>
  </channel>
</rss>

