<?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 covert AD date format (eg. 20140602145733.0Z) into a format that Splunk Enterprise Security can process? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236436#M45968</link>
    <description>&lt;P&gt;Then you can add a second one.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
EVAL-startDate = strptime(startDate,"%Y%m%d%H%M%S.%1NZ")
EVAL-endDate = strptime(endDate,"%Y-%m-%dT%H%M%S.%2NZ")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The important part here is the &lt;CODE&gt;strptime&lt;/CODE&gt; function. That's what does your conversion.&lt;/P&gt;</description>
    <pubDate>Tue, 22 Sep 2015 14:18:30 GMT</pubDate>
    <dc:creator>alacercogitatus</dc:creator>
    <dc:date>2015-09-22T14:18:30Z</dc:date>
    <item>
      <title>How to covert AD date format (eg. 20140602145733.0Z) into a format that Splunk Enterprise Security can process?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236430#M45962</link>
      <description>&lt;P&gt;I designed a scheduled search that populates "identities.csv" by querying Active Directory using 'ldapsearch'. Everything looks fine except that when 'Enterprise Security/Incident Review' reports a big number of "Expired account activity" although the endDate for most of the accounts is "(never)". When I checked the date format for srartDate and endDate, it is of type 20140602145733.0Z I suspect that Splunk don't probably interpret these dates properly thus reporting a large number of "false positive" of expired account activities. &lt;/P&gt;

&lt;P&gt;Any  pointer on the issue is welcome.&lt;/P&gt;

&lt;P&gt;regards&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 13:14:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236430#M45962</guid>
      <dc:creator>aseid</dc:creator>
      <dc:date>2015-09-21T13:14:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to covert AD date format (eg. 20140602145733.0Z) into a format that Splunk Enterprise Security can process?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236431#M45963</link>
      <description>&lt;P&gt;What is your current search that populates identities.csv? I guess issue here is that startDate and endDate fields in this csv is not recognized correctly, hence causing issues???&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 16:40:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236431#M45963</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-09-21T16:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to covert AD date format (eg. 20140602145733.0Z) into a format that Splunk Enterprise Security can process?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236432#M45964</link>
      <description>&lt;P&gt;Both fields are correctly populated; no miss in there.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 18:05:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236432#M45964</guid>
      <dc:creator>aseid</dc:creator>
      <dc:date>2015-09-21T18:05:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to covert AD date format (eg. 20140602145733.0Z) into a format that Splunk Enterprise Security can process?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236433#M45965</link>
      <description>&lt;P&gt;Ok.. The 'Enterprise Security/Incident Review' reports is a custom dashboard OR is part of app for splunk-base?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Sep 2015 18:13:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236433#M45965</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2015-09-21T18:13:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to covert AD date format (eg. 20140602145733.0Z) into a format that Splunk Enterprise Security can process?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236434#M45966</link>
      <description>&lt;P&gt;You can recalculate the date string. Here is a sample of how to convert it.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=_internal | head 1 | eval ADDATE = "20140602145733.0Z" | eval epoch = strptime(ADDATE,"%Y%m%d%H%M%S.%1NZ") | table epoch ADDATE
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You can add this into a props configuration to do it automatically.&lt;/P&gt;

&lt;P&gt;props.conf&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
EVAL-endDate = strptime(endDate,"%Y%m%d%H%M%S.%1NZ")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 21 Sep 2015 18:23:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236434#M45966</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2015-09-21T18:23:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to covert AD date format (eg. 20140602145733.0Z) into a format that Splunk Enterprise Security can process?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236435#M45967</link>
      <description>&lt;P&gt;The above works for 'startDate' (=AD 'whenCreated') but not for 'endDate' (=AD 'accountExpires'). The format of the later is different from the former. An example of endDate is: 2016-03-01T05:00:00Z.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 14:13:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236435#M45967</guid>
      <dc:creator>aseid</dc:creator>
      <dc:date>2015-09-22T14:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to covert AD date format (eg. 20140602145733.0Z) into a format that Splunk Enterprise Security can process?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236436#M45968</link>
      <description>&lt;P&gt;Then you can add a second one.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;[your_sourcetype]
EVAL-startDate = strptime(startDate,"%Y%m%d%H%M%S.%1NZ")
EVAL-endDate = strptime(endDate,"%Y-%m-%dT%H%M%S.%2NZ")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;The important part here is the &lt;CODE&gt;strptime&lt;/CODE&gt; function. That's what does your conversion.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 14:18:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236436#M45968</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2015-09-22T14:18:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to covert AD date format (eg. 20140602145733.0Z) into a format that Splunk Enterprise Security can process?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236437#M45969</link>
      <description>&lt;P&gt;I still have issues with 'endDate'. One thing I noticed is that the endDate  the 'H', 'M' and 'S' fields are separated by a ':' and there is not '.' as you may see from the sample data:   2015-05-09T04:00:00Z. But of course, I tried it by modifying the format within strptime function to reflect these points but in vain. &lt;/P&gt;</description>
      <pubDate>Tue, 22 Sep 2015 15:24:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236437#M45969</guid>
      <dc:creator>aseid</dc:creator>
      <dc:date>2015-09-22T15:24:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to covert AD date format (eg. 20140602145733.0Z) into a format that Splunk Enterprise Security can process?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236438#M45970</link>
      <description>&lt;P&gt;Sorry typo. Try this set:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; [your_sourcetype]
 EVAL-startDate = strptime(startDate,"%Y%m%d%H%M%S.%1NZ")
 EVAL-endDate = strptime(endDate,"%Y-%m-%dT%H:%M:%SZ")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Sep 2015 15:38:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236438#M45970</guid>
      <dc:creator>alacercogitatus</dc:creator>
      <dc:date>2015-09-22T15:38:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to covert AD date format (eg. 20140602145733.0Z) into a format that Splunk Enterprise Security can process?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236439#M45971</link>
      <description>&lt;P&gt;Yeah, I made the following correction and it works:  strptime(endDate,"%Y-%m-%dT%H:%M:%SZ"). Thanks for your will and time. &lt;/P&gt;</description>
      <pubDate>Wed, 23 Sep 2015 13:07:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-covert-AD-date-format-eg-20140602145733-0Z-into-a-format/m-p/236439#M45971</guid>
      <dc:creator>aseid</dc:creator>
      <dc:date>2015-09-23T13:07:52Z</dc:date>
    </item>
  </channel>
</rss>

