<?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 do I change the date format from MMDDYYYY to DDMMYYYY to get my expected search results? in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-change-the-date-format-from-MMDDYYYY-to-DDMMYYYY-to-get/m-p/267653#M51304</link>
    <description>&lt;P&gt;Is there any way to resolve this by using macros.conf&lt;/P&gt;</description>
    <pubDate>Tue, 13 Sep 2016 01:06:31 GMT</pubDate>
    <dc:creator>pavanae</dc:creator>
    <dc:date>2016-09-13T01:06:31Z</dc:date>
    <item>
      <title>How do I change the date format from MMDDYYYY to DDMMYYYY to get my expected search results?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-change-the-date-format-from-MMDDYYYY-to-DDMMYYYY-to-get/m-p/267648#M51299</link>
      <description>&lt;P&gt;The following is my search and its result:&lt;/P&gt;

&lt;P&gt;Search 1:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest="01/08/2016:00:00:01" latest="01/08/2016:23:59:59" `getABCsWin("XYZ","abc12345678")`
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Result 1:&lt;BR /&gt;
No results found.&lt;/P&gt;

&lt;P&gt;Time format used in earliest and latest: DDMMYYYY&lt;/P&gt;

&lt;P&gt;Search 2:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest="08/01/2016:00:00:01" latest="08/01/2016:23:59:59" `getABCsWin("XYZ","abc12345678")`
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Result 2: Expected result acquired.&lt;/P&gt;

&lt;P&gt;Time format used in earliest and latest: MMDDYYYY&lt;/P&gt;

&lt;P&gt;Now we have been using search 1 from long time to get the details and recently search 1 wasn't displaying any results, so we observed some deviation on Splunk search i.e; instead of our default format which was DDMMYYYY events were indexing with the wrong format i.e; MMDDYYYY. So &lt;STRONG&gt;how can we get the result 2 for the search 1&lt;/STRONG&gt; like before?&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Events were as follows:&lt;/STRONG&gt;&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;8/1/16 
4:08:08.000 PM   
 Valid 
08/01/2016 04:08:08 PM
... 12 lines omitted ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Expected changes for the above events to get it resolved:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;1/8/16 
4:08:08.000 PM   
 Valid 
01/08/2016 04:08:08 PM
... 12 lines omitted ...
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Here am just looking to change the Date format from MMDDYYYY to DDMMYYYY to get the expected result. &lt;/P&gt;

&lt;P&gt;Is it something to be done on props.conf in Splunk or in the default log format?&lt;/P&gt;

&lt;P&gt;Sorry if I made you confused with my language.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 18:41:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-change-the-date-format-from-MMDDYYYY-to-DDMMYYYY-to-get/m-p/267648#M51299</guid>
      <dc:creator>pavanae</dc:creator>
      <dc:date>2016-09-07T18:41:56Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the date format from MMDDYYYY to DDMMYYYY to get my expected search results?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-change-the-date-format-from-MMDDYYYY-to-DDMMYYYY-to-get/m-p/267649#M51300</link>
      <description>&lt;P&gt;Based on the example 3 here, mmddyyyy type of format does work (or should've worked in the past as well. Can you try to run search 2 for historical period?&lt;/P&gt;

&lt;P&gt;&lt;A href="https://docs.splunk.com/Documentation/Splunk/6.4.3/SearchReference/SearchTimeModifiers#How_to_specify_relative_time_modifiers"&gt;https://docs.splunk.com/Documentation/Splunk/6.4.3/SearchReference/SearchTimeModifiers#How_to_specify_relative_time_modifiers&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 20:57:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-change-the-date-format-from-MMDDYYYY-to-DDMMYYYY-to-get/m-p/267649#M51300</guid>
      <dc:creator>somesoni2</dc:creator>
      <dc:date>2016-09-07T20:57:03Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the date format from MMDDYYYY to DDMMYYYY to get my expected search results?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-change-the-date-format-from-MMDDYYYY-to-DDMMYYYY-to-get/m-p/267650#M51301</link>
      <description>&lt;P&gt;1) Did you by any chance recently upgrade from a much older version of Splunk?&lt;BR /&gt;&lt;BR /&gt;
the &lt;CODE&gt;earliest="01/08/2016:00:00:01" latest="01/08/2016:23:59:59"&lt;/CODE&gt; has really disappeared from usage in recent years.    A long time ago I know you used to be able to submit &lt;CODE&gt;timeformat="%d/%m/%Y %H:%M:%S"&lt;/CODE&gt; but this argument seems to be no longer supported.  At least, I can't get it to do anything.  Interestingly, Splunk doesn't give any errors about it's presence in my searches.  &lt;/P&gt;

&lt;P&gt;2) Also,  I think that in at least some of those older versions,  this behavior was locale-sensitive.   ie if you had /en-US/ in your location bar you'd get US English and "%m/%d/%Y %H:%M:%S" behavior,  but if you had /en-GB/  you'd get "%d/%m/%Y %H:%M:%S" behavior.&lt;BR /&gt;&lt;BR /&gt;
Here's a lot more information about locale,  how Splunk knows which to use, and what it does with the info.  &lt;A href="https://docs.splunk.com/Documentation/Splunk/6.4.3/Admin/Userlanguageandlocale"&gt;https://docs.splunk.com/Documentation/Splunk/6.4.3/Admin/Userlanguageandlocale&lt;/A&gt; &lt;/P&gt;

&lt;P&gt;3) NOTE:  although timestamp display is very much locale-sensitive across the Splunk UI, when it comes to absolute times specified as mm/dd/yyyy or dd/mm/yyyy,  earliest/latest appears to have been hardcoded to mm/dd/yy for a while now. &lt;/P&gt;

&lt;P&gt;sanity checking - is it possible that those searches really weren't returning the events you thought they were?  The timeline is often a good clue because it will show neighboring days and therefore you can see which digit is actually incrementing!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2016 21:32:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-change-the-date-format-from-MMDDYYYY-to-DDMMYYYY-to-get/m-p/267650#M51301</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2016-09-07T21:32:53Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the date format from MMDDYYYY to DDMMYYYY to get my expected search results?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-change-the-date-format-from-MMDDYYYY-to-DDMMYYYY-to-get/m-p/267651#M51302</link>
      <description>&lt;P&gt;So is there any way to change those time_format ?&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 12:24:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-change-the-date-format-from-MMDDYYYY-to-DDMMYYYY-to-get/m-p/267651#M51302</guid>
      <dc:creator>pavanae</dc:creator>
      <dc:date>2016-09-08T12:24:40Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the date format from MMDDYYYY to DDMMYYYY to get my expected search results?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-change-the-date-format-from-MMDDYYYY-to-DDMMYYYY-to-get/m-p/267652#M51303</link>
      <description>&lt;P&gt;You are supposed to be able to use the timeformat="%d/%m/%Y:%H:%M:%S" argument in your search string to get your desired behavior.  It certainly used to work, however it doesn't work anymore and it seems to just be a bug. &lt;/P&gt;

&lt;P&gt;As it says in these docs: &lt;/P&gt;

&lt;P&gt;(see the listing for "timeformat"  &lt;A href="https://docs.splunk.com/Documentation/Splunk/6.4.3/SearchReference/SearchTimeModifiers"&gt;https://docs.splunk.com/Documentation/Splunk/6.4.3/SearchReference/SearchTimeModifiers&lt;/A&gt; ) &lt;/P&gt;

&lt;P&gt;you're supposed to be able to use the timeformat argument in your search strings,   to specify exactly what timeformat your string-formatted absolute starttime and endtime terms are using. &lt;/P&gt;

&lt;P&gt;For example: &lt;BR /&gt;
&lt;CODE&gt;index=_* starttime="06/09/2016:00:00:00" endtime="07/09/2016:00:00:00" timeformat="%d/%m/%Y:%H:%M:%S"&lt;/CODE&gt;&lt;/P&gt;

&lt;P&gt;That search should search midnight september 6th to midnight on September 7th.    But it doesn't.  It searches from June 9th to July 9th.  It ignores the timeformat arg completely. &lt;/P&gt;

&lt;P&gt;I thought maybe it deferred to locale (ie en-US vs en-GB vs fr-FR in your URL and elsewhere),  but it seems to ignore that too.   In all cases that I've found it interprets string-formatted absolute starttime/endtime args as US-dates,  ie as %m/%d/%Y:%H:%M:%S&lt;/P&gt;

&lt;P&gt;Sorry I can't be of more help.  I would open a case with Splunk Support to have them investigate. Quite possibly it's a recent regression and you might be able to downgrade as a last resort. &lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2016 17:01:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-change-the-date-format-from-MMDDYYYY-to-DDMMYYYY-to-get/m-p/267652#M51303</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2016-09-08T17:01:30Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the date format from MMDDYYYY to DDMMYYYY to get my expected search results?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-change-the-date-format-from-MMDDYYYY-to-DDMMYYYY-to-get/m-p/267653#M51304</link>
      <description>&lt;P&gt;Is there any way to resolve this by using macros.conf&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 01:06:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-change-the-date-format-from-MMDDYYYY-to-DDMMYYYY-to-get/m-p/267653#M51304</guid>
      <dc:creator>pavanae</dc:creator>
      <dc:date>2016-09-13T01:06:31Z</dc:date>
    </item>
    <item>
      <title>Re: How do I change the date format from MMDDYYYY to DDMMYYYY to get my expected search results?</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-do-I-change-the-date-format-from-MMDDYYYY-to-DDMMYYYY-to-get/m-p/267654#M51305</link>
      <description>&lt;P&gt;Well,  it would be nice,  but macros.conf ultimately can't do anything for you beyond what you can do yourself in the Search Language. =/  In this case it's the actual searchterm itself that seems to not work.   &lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2016 01:21:54 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-do-I-change-the-date-format-from-MMDDYYYY-to-DDMMYYYY-to-get/m-p/267654#M51305</guid>
      <dc:creator>sideview</dc:creator>
      <dc:date>2016-09-13T01:21:54Z</dc:date>
    </item>
  </channel>
</rss>

