<?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 create timechart using a string date field in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/create-timechart-using-a-string-date-field/m-p/246712#M73552</link>
    <description>&lt;P&gt;I found a few answers here on this forum on how to use a date string field as the datetime for a timechart. I tried these but could not get it to work. &lt;BR /&gt;
I want to view counts for the last 7 days based on that date. The datetime field format is the following;&lt;/P&gt;

&lt;P&gt;created_date&lt;BR /&gt;
2016-08-18T13:45:08.000Z&lt;/P&gt;

&lt;P&gt;This is the original timechart format &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/data.newIndex/tcp/10064" timechart count AS Count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but I changed to the one this and still not getting any results I expected.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/data.newIndex/tcp/10064"  eval e_field = strptime(created_date, "%Y-%M-dThh:hh:ss.000Z") | eval _time = e_field | timechart count AS Count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please any advice or assistance appreciated. &lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
    <pubDate>Thu, 25 Aug 2016 17:22:33 GMT</pubDate>
    <dc:creator>jdepp</dc:creator>
    <dc:date>2016-08-25T17:22:33Z</dc:date>
    <item>
      <title>create timechart using a string date field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/create-timechart-using-a-string-date-field/m-p/246712#M73552</link>
      <description>&lt;P&gt;I found a few answers here on this forum on how to use a date string field as the datetime for a timechart. I tried these but could not get it to work. &lt;BR /&gt;
I want to view counts for the last 7 days based on that date. The datetime field format is the following;&lt;/P&gt;

&lt;P&gt;created_date&lt;BR /&gt;
2016-08-18T13:45:08.000Z&lt;/P&gt;

&lt;P&gt;This is the original timechart format &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/data.newIndex/tcp/10064" timechart count AS Count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;but I changed to the one this and still not getting any results I expected.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/data.newIndex/tcp/10064"  eval e_field = strptime(created_date, "%Y-%M-dThh:hh:ss.000Z") | eval _time = e_field | timechart count AS Count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please any advice or assistance appreciated. &lt;/P&gt;

&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 17:22:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/create-timechart-using-a-string-date-field/m-p/246712#M73552</guid>
      <dc:creator>jdepp</dc:creator>
      <dc:date>2016-08-25T17:22:33Z</dc:date>
    </item>
    <item>
      <title>Re: create timechart using a string date field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/create-timechart-using-a-string-date-field/m-p/246713#M73553</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/data.newIndex/tcp/10064" | eval e_field = strptime(created_date, "%Y-%m-%dT%H:%M:%S.%3NZ") | eval _time=e_field | timechart count AS Count
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;*&lt;STRONG&gt;&lt;EM&gt;OR&lt;/EM&gt;&lt;/STRONG&gt;*&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;source="/data.newIndex/tcp/10064" | eval e_field = strptime(created_date, "%Y-%m-%dT%H:%M:%S.%3NZ") | bin e_field | stats count AS Count by e_field
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 25 Aug 2016 17:31:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/create-timechart-using-a-string-date-field/m-p/246713#M73553</guid>
      <dc:creator>sundareshr</dc:creator>
      <dc:date>2016-08-25T17:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: create timechart using a string date field</title>
      <link>https://community.splunk.com/t5/Splunk-Search/create-timechart-using-a-string-date-field/m-p/246714#M73554</link>
      <description>&lt;P&gt;the first one worked. Thanks very much. Appreciate it.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Aug 2016 18:12:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/create-timechart-using-a-string-date-field/m-p/246714#M73554</guid>
      <dc:creator>jdepp</dc:creator>
      <dc:date>2016-08-25T18:12:41Z</dc:date>
    </item>
  </channel>
</rss>

