<?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 Configure timestamp based only on Month and Year in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Configure-timestamp-based-only-on-Month-and-Year/m-p/335566#M62055</link>
    <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have a problem to configure the timestamp on one of my source CSV file. &lt;/P&gt;

&lt;P&gt;In this file, I have a column containing the timestamp. Its format is %Y%m (for example &lt;STRONG&gt;201701&lt;/STRONG&gt; for January 2017). When I define the TIME_FORMAT to %Y%m, it does not work, I still have the error &lt;EM&gt;Failed to parse timestamp&lt;/EM&gt;. I think it is because my timestamp does not contain a specific date. &lt;/P&gt;

&lt;P&gt;Is there a way to define a timestamp on data despite it contains only the Year and the Month?&lt;/P&gt;

&lt;P&gt;Thanks for your reply.&lt;/P&gt;

&lt;P&gt;Maxime&lt;/P&gt;</description>
    <pubDate>Thu, 20 Apr 2017 11:48:17 GMT</pubDate>
    <dc:creator>MaximeMouquet</dc:creator>
    <dc:date>2017-04-20T11:48:17Z</dc:date>
    <item>
      <title>Configure timestamp based only on Month and Year</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-timestamp-based-only-on-Month-and-Year/m-p/335566#M62055</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;I have a problem to configure the timestamp on one of my source CSV file. &lt;/P&gt;

&lt;P&gt;In this file, I have a column containing the timestamp. Its format is %Y%m (for example &lt;STRONG&gt;201701&lt;/STRONG&gt; for January 2017). When I define the TIME_FORMAT to %Y%m, it does not work, I still have the error &lt;EM&gt;Failed to parse timestamp&lt;/EM&gt;. I think it is because my timestamp does not contain a specific date. &lt;/P&gt;

&lt;P&gt;Is there a way to define a timestamp on data despite it contains only the Year and the Month?&lt;/P&gt;

&lt;P&gt;Thanks for your reply.&lt;/P&gt;

&lt;P&gt;Maxime&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2017 11:48:17 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-timestamp-based-only-on-Month-and-Year/m-p/335566#M62055</guid>
      <dc:creator>MaximeMouquet</dc:creator>
      <dc:date>2017-04-20T11:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Configure timestamp based only on Month and Year</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-timestamp-based-only-on-Month-and-Year/m-p/335567#M62056</link>
      <description>&lt;P&gt;Hello MaximeMouquet,&lt;BR /&gt;
sharing some screenshot in an answer below. i am joining the question as i was not able to extract timestamp with year and month only. However, splunk is all about time and ability to distinguish between events based on time. What is the use case for this data? can the application creating this data add a date to the column that has the timestamp?&lt;BR /&gt;
finally, its worthwhile to include the field that contains the time in props.conf:  &lt;CODE&gt;TIMESTAMP_FIELDS = timeField&lt;/CODE&gt;&lt;BR /&gt;
hope it helps&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2017 15:46:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-timestamp-based-only-on-Month-and-Year/m-p/335567#M62056</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2017-04-20T15:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: Configure timestamp based only on Month and Year</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-timestamp-based-only-on-Month-and-Year/m-p/335568#M62057</link>
      <description>&lt;P&gt;adding screenshots per comment above:&lt;BR /&gt;
one with only year and month and second with year month and day&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/2789i319B7DA76B7EDA1F/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;&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/2790i2519DE962CCC0544/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2017 15:48:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-timestamp-based-only-on-Month-and-Year/m-p/335568#M62057</guid>
      <dc:creator>adonio</dc:creator>
      <dc:date>2017-04-20T15:48:58Z</dc:date>
    </item>
    <item>
      <title>Re: Configure timestamp based only on Month and Year</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-timestamp-based-only-on-Month-and-Year/m-p/335569#M62058</link>
      <description>&lt;P&gt;In this case, at search time, I use... &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval MyField=strptime(MyYYMMfield."01","%Y%m%d") 
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;...which is what you'd hope the default behavior would be.  &lt;/P&gt;

&lt;P&gt;Worst case scenario, you'd have to do three steps, first to create a calculated field that concatenates "01" on the end, second to parse the field into a time format, and third to rewrite the timestamp.   Given the screenshot, I'd think you can do it in two.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Apr 2017 15:59:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-timestamp-based-only-on-Month-and-Year/m-p/335569#M62058</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-04-20T15:59:44Z</dc:date>
    </item>
    <item>
      <title>Re: Configure timestamp based only on Month and Year</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-timestamp-based-only-on-Month-and-Year/m-p/335570#M62059</link>
      <description>&lt;P&gt;The problem I have is exactly the same as adonio so I am not the only one, thanks for screenshots.&lt;/P&gt;

&lt;P&gt;The solution you provide DalJeanis is great and it works but only if we display results in a timechart or a table.&lt;BR /&gt;
In my case, I would like to reuse this timestamp in the timerange picker of my report or dashboard. Is there a way to do that ? I did not find it...&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 12:54:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-timestamp-based-only-on-Month-and-Year/m-p/335570#M62059</guid>
      <dc:creator>MaximeMouquet</dc:creator>
      <dc:date>2017-04-21T12:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Configure timestamp based only on Month and Year</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-timestamp-based-only-on-Month-and-Year/m-p/335571#M62060</link>
      <description>&lt;P&gt;@MaximeMouquet  Basically, if some data is being stored as a time field, then you add the "01" and calculate is as the first day of the month.  If it is being stored as a display field, you make sure it is in "YYYY/MM" or "YYYY-MM" order so that comparisons will work correctly.  &lt;/P&gt;

&lt;P&gt;Time pickers will work fine if the underlying data is stored as a date/time.  If the data is being stored in a display format, then you will need an additional step to translate the date(s) picked into YYYY/MM format, and then it should work fine.  &lt;/P&gt;

&lt;P&gt;That extra step is usually coded as running a trivial query to convert the format.  See this thread for some sample code... &lt;A href="https://answers.splunk.com/answers/438999/dashboard-how-can-i-convert-a-token-from-a-time-pi.html"&gt;https://answers.splunk.com/answers/438999/dashboard-how-can-i-convert-a-token-from-a-time-pi.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 14:26:15 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-timestamp-based-only-on-Month-and-Year/m-p/335571#M62060</guid>
      <dc:creator>DalJeanis</dc:creator>
      <dc:date>2017-04-21T14:26:15Z</dc:date>
    </item>
    <item>
      <title>Re: Configure timestamp based only on Month and Year</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Configure-timestamp-based-only-on-Month-and-Year/m-p/335572#M62061</link>
      <description>&lt;P&gt;I found a way to create dashboard with new timestamp that I specify in the search with the eval command and it works.&lt;/P&gt;

&lt;P&gt;In my search, I use this : | eval _time=strptime(MyYYMMfield."01","%Y%m%d") &lt;/P&gt;

&lt;P&gt;Then, I use a saved with summary index to store the result of my first search. For the events in the summary index, the timestamp is not the orginal one of the original event but the one calculated in the search with the eval function.&lt;/P&gt;

&lt;P&gt;Thanks for your help.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Apr 2017 15:08:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Configure-timestamp-based-only-on-Month-and-Year/m-p/335572#M62061</guid>
      <dc:creator>MaximeMouquet</dc:creator>
      <dc:date>2017-04-21T15:08:05Z</dc:date>
    </item>
  </channel>
</rss>

