<?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 How to extract date and time from xml source file? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-from-xml-source-file/m-p/278404#M84042</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;Can you help me how to extract Date and Time from below XMLsample? &lt;/P&gt;

&lt;P&gt;Here is example of a log:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1438iED932118DCB5EDF7/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I am looking for event associated timestamp (_time) will show as &lt;STRONG&gt;2015-08-08T23:58:00&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Thanks, cheers&lt;/P&gt;</description>
    <pubDate>Thu, 02 Jun 2016 11:25:40 GMT</pubDate>
    <dc:creator>maheshj</dc:creator>
    <dc:date>2016-06-02T11:25:40Z</dc:date>
    <item>
      <title>How to extract date and time from xml source file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-from-xml-source-file/m-p/278404#M84042</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;

&lt;P&gt;Can you help me how to extract Date and Time from below XMLsample? &lt;/P&gt;

&lt;P&gt;Here is example of a log:&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1438iED932118DCB5EDF7/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;I am looking for event associated timestamp (_time) will show as &lt;STRONG&gt;2015-08-08T23:58:00&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;Thanks, cheers&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2016 11:25:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-from-xml-source-file/m-p/278404#M84042</guid>
      <dc:creator>maheshj</dc:creator>
      <dc:date>2016-06-02T11:25:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract date and time from xml source file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-from-xml-source-file/m-p/278405#M84043</link>
      <description>&lt;P&gt;Hi Everyone,&lt;/P&gt;

&lt;P&gt;I have tried below configuration setting in props.conf&lt;BR /&gt;
&lt;STRONG&gt;props.conf&lt;/STRONG&gt;&lt;BR /&gt;
&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/1436i08B454165D7B910A/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;But it shows event associated timestamp as 2015-08-08T00:00:00&lt;/P&gt;

&lt;P&gt;Please guide me where I am going wrong?&lt;/P&gt;

&lt;P&gt;Thanks, cheers&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2016 12:04:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-from-xml-source-file/m-p/278405#M84043</guid>
      <dc:creator>maheshj</dc:creator>
      <dc:date>2016-06-02T12:04:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract date and time from xml source file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-from-xml-source-file/m-p/278406#M84044</link>
      <description>&lt;P&gt;I believe the TIME_FORMAT string won't match your data because of the "T00:00:00".&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2016 12:52:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-from-xml-source-file/m-p/278406#M84044</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2016-06-02T12:52:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to extract date and time from xml source file?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-from-xml-source-file/m-p/278407#M84045</link>
      <description>&lt;P&gt;Try this (problems in &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt;, &lt;CODE&gt;TIME_PREFIX&lt;/CODE&gt;, and &lt;CODE&gt;TIME_FORMAT&lt;/CODE&gt; and &lt;CODE&gt;MAX_TIMESTAMP_LOOKAHEAD&lt;/CODE&gt;&lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;TIME_PREFIX = &amp;lt;date&amp;gt;
TIME_FORMAT = %Y-%m-%dT%H:%M:%S
MAX_TIMESTAMP_LOOKAHEAD = 19
SHOULD_LINEMERGE = False
LINE_BREAKER = (&amp;lt;\/row&amp;gt;)
TRUNCATE = 0
KV_MODE=XML
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;You might also check out this Q&amp;amp;A:&lt;BR /&gt;
&lt;A href="https://answers.splunk.com/answers/406376/how-do-i-edit-my-datetimexml-file-for-my-custom-da.html#answer-407901"&gt;https://answers.splunk.com/answers/406376/how-do-i-edit-my-datetimexml-file-for-my-custom-da.html#answer-407901&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Whenever you modify &lt;CODE&gt;LINE_BREAKER&lt;/CODE&gt;, you should always use &lt;CODE&gt;SHOULD_LINEMERGE = False&lt;/CODE&gt;.&lt;/P&gt;

&lt;P&gt;Also, why are you using image links instead of pasting text?  Then we have to type it all in (among other annoyances and problems).&lt;/P&gt;</description>
      <pubDate>Thu, 02 Jun 2016 14:27:29 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-extract-date-and-time-from-xml-source-file/m-p/278407#M84045</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2016-06-02T14:27:29Z</dc:date>
    </item>
  </channel>
</rss>

