<?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: extract date with characters between in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/extract-date-with-characters-between/m-p/94635#M19697</link>
    <description>&lt;P&gt;If I understand correctly you want to parse the string "2013-01-17T09:35:49Z" into a time value , so you should use str*&lt;EM&gt;p&lt;/EM&gt;&lt;EM&gt;time not str&lt;/EM&gt;&lt;EM&gt;f&lt;/EM&gt;*time&lt;/P&gt;</description>
    <pubDate>Mon, 28 Sep 2020 13:09:30 GMT</pubDate>
    <dc:creator>Damien_Dallimor</dc:creator>
    <dc:date>2020-09-28T13:09:30Z</dc:date>
    <item>
      <title>extract date with characters between</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/extract-date-with-characters-between/m-p/94634#M19696</link>
      <description>&lt;P&gt;I try to transform a date string, into a date, to enable splunk to sort it.&lt;/P&gt;

&lt;P&gt;Here is a sample :&lt;BR /&gt;
2013-01-17T09:35:49Z&lt;/P&gt;

&lt;P&gt;Hi tried :&lt;BR /&gt;
eval n=strftime(field, " %Y-%m-%dT%H:%M:%SZ")&lt;/P&gt;

&lt;P&gt;But it doesn't work. Why ? What would be the best way to do this ?&lt;BR /&gt;
Is there a way to automate the conversion at searchtime ?&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2013 10:04:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/extract-date-with-characters-between/m-p/94634#M19696</guid>
      <dc:creator>sbsbb</dc:creator>
      <dc:date>2013-01-22T10:04:10Z</dc:date>
    </item>
    <item>
      <title>Re: extract date with characters between</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/extract-date-with-characters-between/m-p/94635#M19697</link>
      <description>&lt;P&gt;If I understand correctly you want to parse the string "2013-01-17T09:35:49Z" into a time value , so you should use str*&lt;EM&gt;p&lt;/EM&gt;&lt;EM&gt;time not str&lt;/EM&gt;&lt;EM&gt;f&lt;/EM&gt;*time&lt;/P&gt;</description>
      <pubDate>Mon, 28 Sep 2020 13:09:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/extract-date-with-characters-between/m-p/94635#M19697</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2020-09-28T13:09:30Z</dc:date>
    </item>
    <item>
      <title>Re: extract date with characters between</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/extract-date-with-characters-between/m-p/94636#M19698</link>
      <description>&lt;P&gt;Ok, thanks, but &lt;BR /&gt;
eval n=strptime(field, " %Y-%m-%dT%H:%M:%SZ")&lt;BR /&gt;
still returns no value&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2013 11:10:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/extract-date-with-characters-between/m-p/94636#M19698</guid>
      <dc:creator>sbsbb</dc:creator>
      <dc:date>2013-01-22T11:10:04Z</dc:date>
    </item>
    <item>
      <title>Re: extract date with characters between</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/extract-date-with-characters-between/m-p/94637#M19699</link>
      <description>&lt;P&gt;This worked fine for me, I think you have an accidental space character before the "%Y" :&lt;/P&gt;

&lt;P&gt;...| eval foo="2013-01-17T09:35:49Z" | eval goo=strptime(foo,"%Y-%m-%dT%H:%M:%SZ") | table goo&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2013 11:18:38 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/extract-date-with-characters-between/m-p/94637#M19699</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2013-01-22T11:18:38Z</dc:date>
    </item>
    <item>
      <title>Re: extract date with characters between</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/extract-date-with-characters-between/m-p/94638#M19700</link>
      <description>&lt;P&gt;It was because of a leading space character... it works now, thanks&lt;/P&gt;</description>
      <pubDate>Tue, 22 Jan 2013 11:22:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/extract-date-with-characters-between/m-p/94638#M19700</guid>
      <dc:creator>sbsbb</dc:creator>
      <dc:date>2013-01-22T11:22:07Z</dc:date>
    </item>
    <item>
      <title>Re: extract date with characters between</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/extract-date-with-characters-between/m-p/94639#M19701</link>
      <description>&lt;P&gt;At index Time, splunk is able to reconize Timeformat automatically, is there a way to use the same recognition an search time, with "convert" for example ?&lt;/P&gt;

&lt;P&gt;I have 4 different Timeformat for the same field, and I want to be able to convert it in one way...:&lt;BR /&gt;
2014-08-15T10:13:00+02:00&lt;BR /&gt;
2014-08-15T10:13:00.000+02:00&lt;BR /&gt;
2014-08-15T08:41:36Z&lt;BR /&gt;
2014-08-15T08:41:36.000Z&lt;/P&gt;

&lt;P&gt;if I use &lt;BR /&gt;
| convert auto()&lt;/P&gt;

&lt;P&gt;I only get the year...&lt;BR /&gt;
But somehow Splunk is able to handle this by indexing, maybe a function is missing being able to use it a search time ?&lt;/P&gt;</description>
      <pubDate>Fri, 15 Aug 2014 08:51:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/extract-date-with-characters-between/m-p/94639#M19701</guid>
      <dc:creator>sbsbb</dc:creator>
      <dc:date>2014-08-15T08:51:58Z</dc:date>
    </item>
  </channel>
</rss>

