<?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 Date extraction command Question for LDAP dump in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Date-extraction-command-Question-for-LDAP-dump/m-p/549907#M156059</link>
    <description>&lt;P&gt;hi there- I tried a few things already, but looking to get guidence on this one- I am using the LDAP query module in Splunk to dump out directory information and then present into a simple table, and running into a challenge simplifying extraction of the date from the AD account creation field:&lt;/P&gt;&lt;P&gt;| ldapsearch basedn="XXXXXXXXXXX" search="(&amp;amp;(objectCategory=user)(objectClass=user)(distinguishedName=*))" attrs="displayName,distinguishedName,mail,lastLogonTimestamp,whenCreated"&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to simplify presentation of the two date and time fields:&amp;nbsp; lasLogonTimestamp and whenCreated.&lt;/P&gt;&lt;P&gt;What I get with these fields today when I output to a table (example)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2019-05-06 16:53:24+00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;What I want to see:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2019-05-06&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What I have tried:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;adding in:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| eval Created=strftime(whenCreated,"%Y%m%d") | prior to my table command.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;this seems to result in nothing being populated in the new field (I am expecting just a date value) ...I am not sure if the strftime command is correct when it comes to this format of data...&lt;/P&gt;&lt;P&gt;thoughts welcomed as always&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 29 Apr 2021 20:44:16 GMT</pubDate>
    <dc:creator>daryllj</dc:creator>
    <dc:date>2021-04-29T20:44:16Z</dc:date>
    <item>
      <title>Date extraction command Question for LDAP dump</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-extraction-command-Question-for-LDAP-dump/m-p/549907#M156059</link>
      <description>&lt;P&gt;hi there- I tried a few things already, but looking to get guidence on this one- I am using the LDAP query module in Splunk to dump out directory information and then present into a simple table, and running into a challenge simplifying extraction of the date from the AD account creation field:&lt;/P&gt;&lt;P&gt;| ldapsearch basedn="XXXXXXXXXXX" search="(&amp;amp;(objectCategory=user)(objectClass=user)(distinguishedName=*))" attrs="displayName,distinguishedName,mail,lastLogonTimestamp,whenCreated"&amp;nbsp;&lt;/P&gt;&lt;P&gt;I want to simplify presentation of the two date and time fields:&amp;nbsp; lasLogonTimestamp and whenCreated.&lt;/P&gt;&lt;P&gt;What I get with these fields today when I output to a table (example)&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2019-05-06 16:53:24+00:00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;What I want to see:&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2019-05-06&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;What I have tried:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;adding in:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;| eval Created=strftime(whenCreated,"%Y%m%d") | prior to my table command.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;this seems to result in nothing being populated in the new field (I am expecting just a date value) ...I am not sure if the strftime command is correct when it comes to this format of data...&lt;/P&gt;&lt;P&gt;thoughts welcomed as always&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 20:44:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-extraction-command-Question-for-LDAP-dump/m-p/549907#M156059</guid>
      <dc:creator>daryllj</dc:creator>
      <dc:date>2021-04-29T20:44:16Z</dc:date>
    </item>
    <item>
      <title>Re: Date extraction command Question for LDAP dump</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-extraction-command-Question-for-LDAP-dump/m-p/549993#M156076</link>
      <description>&lt;P&gt;To convert a timestamp from one string format into another string format you must first convert it into an integer using &lt;FONT face="courier new,courier"&gt;strptime&lt;/FONT&gt;.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Created=strftime(strptime(whenCreated,"%Y-%m-%d %H:%M:%S%:z"),"%Y-%m-%d") | &lt;/LI-CODE&gt;</description>
      <pubDate>Fri, 30 Apr 2021 12:23:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-extraction-command-Question-for-LDAP-dump/m-p/549993#M156076</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2021-04-30T12:23:08Z</dc:date>
    </item>
    <item>
      <title>Re: Date extraction command Question for LDAP dump</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Date-extraction-command-Question-for-LDAP-dump/m-p/550033#M156085</link>
      <description>&lt;P&gt;Thanks for taking the time out to educate me on this one- works perfectly,&amp;nbsp; I really appreciate you taking a few minutes of your time!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Apr 2021 15:39:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Date-extraction-command-Question-for-LDAP-dump/m-p/550033#M156085</guid>
      <dc:creator>daryllj</dc:creator>
      <dc:date>2021-04-30T15:39:08Z</dc:date>
    </item>
  </channel>
</rss>

