<?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 Windows LDAP 18 digit lastLogonTimestamp field to human readable format? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-Windows-LDAP-18-digit-lastLogonTimestamp-field-to/m-p/298264#M56433</link>
    <description>&lt;P&gt;You can use following formula to convert LDAP/FILETIME timestamps to human readable date in Splunk. See this runanywhere sample&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval time=131315659450000000 | eval time_s=(time/10000000)-11644473600 | eval time_human=strftime(time_s,"%+")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 14 Feb 2017 17:16:06 GMT</pubDate>
    <dc:creator>somesoni2</dc:creator>
    <dc:date>2017-02-14T17:16:06Z</dc:date>
    <item>
      <title>How to convert Windows LDAP 18 digit lastLogonTimestamp field to human readable format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-Windows-LDAP-18-digit-lastLogonTimestamp-field-to/m-p/298260#M56429</link>
      <description>&lt;P&gt;I've seen lots of different solutions for converting time from epoch but I have not come across a solution that works to convert the Windows LDAP 18-digit lastLogonTimestamp field. How do I convert this field to a human readable field?&lt;/P&gt;

&lt;P&gt;Thank you.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 16:21:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-Windows-LDAP-18-digit-lastLogonTimestamp-field-to/m-p/298260#M56429</guid>
      <dc:creator>DPWSplunkPOC</dc:creator>
      <dc:date>2017-02-14T16:21:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Windows LDAP 18 digit lastLogonTimestamp field to human readable format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-Windows-LDAP-18-digit-lastLogonTimestamp-field-to/m-p/298261#M56430</link>
      <description>&lt;P&gt;Hi DPWSplunkPOC&lt;BR /&gt;
did you tried?&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval TimeStamp=strftime(_time,"%d/%m/%Y %H.%M.%S")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 16:30:46 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-Windows-LDAP-18-digit-lastLogonTimestamp-field-to/m-p/298261#M56430</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-02-14T16:30:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Windows LDAP 18 digit lastLogonTimestamp field to human readable format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-Windows-LDAP-18-digit-lastLogonTimestamp-field-to/m-p/298262#M56431</link>
      <description>&lt;P&gt;Yes I have. This does not work for Windows LDAP time stamps because Active Directory stores date/time values as the number of 100-nanosecond intervals that have elapsed since the 0 hour on January 1, 1601 until the date/time that is being stored according to MS technet. &lt;/P&gt;

&lt;P&gt;If Windows used epoch in LDAP, that eval would work.&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 16:37:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-Windows-LDAP-18-digit-lastLogonTimestamp-field-to/m-p/298262#M56431</guid>
      <dc:creator>DPWSplunkPOC</dc:creator>
      <dc:date>2017-02-14T16:37:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Windows LDAP 18 digit lastLogonTimestamp field to human readable format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-Windows-LDAP-18-digit-lastLogonTimestamp-field-to/m-p/298263#M56432</link>
      <description>&lt;P&gt;did you tried&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;eval TimeStamp=strftime(_time/100,"%d/%m/%Y %H.%M.%S")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Bye.&lt;BR /&gt;
Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 14 Feb 2017 16:43:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-Windows-LDAP-18-digit-lastLogonTimestamp-field-to/m-p/298263#M56432</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2017-02-14T16:43:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Windows LDAP 18 digit lastLogonTimestamp field to human readable format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-Windows-LDAP-18-digit-lastLogonTimestamp-field-to/m-p/298264#M56433</link>
      <description>&lt;P&gt;You can use following formula to convert LDAP/FILETIME timestamps to human readable date in Splunk. See this runanywhere sample&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| gentimes start=-1 | eval time=131315659450000000 | eval time_s=(time/10000000)-11644473600 | eval time_human=strftime(time_s,"%+")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 14 Feb 2017 17:16:06 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-Windows-LDAP-18-digit-lastLogonTimestamp-field-to/m-p/298264#M56433</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2017-02-14T17:16:06Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert Windows LDAP 18 digit lastLogonTimestamp field to human readable format?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-Windows-LDAP-18-digit-lastLogonTimestamp-field-to/m-p/298265#M56434</link>
      <description>&lt;P&gt;Thank you for your answer&lt;/P&gt;

&lt;P&gt;This worked and gave me an easy to read output from my AD data. I need to take it a step further. I need to look for users that have not logged in for 6 months.&lt;/P&gt;

&lt;P&gt;My search looks like this:&lt;/P&gt;

&lt;P&gt;index=myADdata&lt;BR /&gt;
| eval lastLogon = strftime(lastLogonTimestamp/10000000-11644473600,"%m/%d/%Y") &lt;BR /&gt;
| where last_logon &amp;lt; (now() - (86400 * 180))&lt;BR /&gt;
| table cn lastLogon&lt;/P&gt;</description>
      <pubDate>Wed, 15 Feb 2017 13:59:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-convert-Windows-LDAP-18-digit-lastLogonTimestamp-field-to/m-p/298265#M56434</guid>
      <dc:creator>DPWSplunkPOC</dc:creator>
      <dc:date>2017-02-15T13:59:17Z</dc:date>
    </item>
  </channel>
</rss>

