<?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: strptime() eval not working ? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643626#M222958</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/256827"&gt;@dtibi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 17 May 2023 12:57:19 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2023-05-17T12:57:19Z</dc:date>
    <item>
      <title>Why is strptime() eval not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643583#M222936</link>
      <description>&lt;P&gt;I'm trying to evaluate the date string to a time format sing the strptime()&lt;BR /&gt;&lt;BR /&gt;the format I have is:&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;SPAN&gt;Tue_Oct_25_03:57:49_IDT_2022&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;the strptime function looks like:&amp;nbsp;&lt;BR /&gt;strptime(date,"%a_%b_%d_%H:%M:%S_%Z_%Y")&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Running the query:&lt;BR /&gt;index="some_index" source="some_source" | head 20 | eval d=strptime(date,"%a_%b_%d_%H:%M:%S_%Z_%Y") | table d date&lt;BR /&gt;&lt;BR /&gt;shows me a table with empty d values and date is showing as expected.&lt;BR /&gt;What am I doing wrong here?&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 12:22:57 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643583#M222936</guid>
      <dc:creator>dtibi</dc:creator>
      <dc:date>2023-05-17T12:22:57Z</dc:date>
    </item>
    <item>
      <title>Re: strptime() eval not working ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643585#M222937</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/256827"&gt;@dtibi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the strptime funtion is correct, are you sure about the date values?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 09:28:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643585#M222937</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-05-17T09:28:55Z</dc:date>
    </item>
    <item>
      <title>Re: strptime() eval not working ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643603#M222943</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;Thanks for the reply.&lt;BR /&gt;I'm pretty sure.&lt;BR /&gt;This issue waisted a lot of my time. not sure how to handle.&amp;nbsp;&lt;BR /&gt;Would very much appreciate any help.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Screenshot 2023-05-17 131725.jpg" style="width: 999px;"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/25412iE41B16872F0F6244/image-size/large?v=v2&amp;amp;px=999" role="button" title="Screenshot 2023-05-17 131725.jpg" alt="Screenshot 2023-05-17 131725.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 10:20:48 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643603#M222943</guid>
      <dc:creator>dtibi</dc:creator>
      <dc:date>2023-05-17T10:20:48Z</dc:date>
    </item>
    <item>
      <title>Re: strptime() eval not working ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643604#M222944</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/256827"&gt;@dtibi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;could you share some sample of your logs?&lt;/P&gt;&lt;P&gt;please use the Insert/Edit code sample button and not a screenshot!&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 10:25:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643604#M222944</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-05-17T10:25:30Z</dc:date>
    </item>
    <item>
      <title>Re: strptime() eval not working ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643610#M222947</link>
      <description>&lt;P&gt;This looks like a bug - IDT doesn't appear to be supported by strptime() - try replacing it with the equivalent&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval d=strptime(replace(date,"IDT","+0300"),"%a_%b_%d_%H:%M:%S_%z_%Y")&lt;/LI-CODE&gt;&lt;P&gt;Note the change to lowercase z in the timeformat&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 11:28:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643610#M222947</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-17T11:28:02Z</dc:date>
    </item>
    <item>
      <title>Re: Why is strptime() eval not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643619#M222952</link>
      <description>&lt;P&gt;You mean the copy from screen to code sample like this ? (see below)&amp;nbsp;&lt;BR /&gt;Do know if there Is a way to debug this further?&lt;BR /&gt;maybe because the field name is date it has some internal conflict or some other black magic causing this not to work?&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":winking_face_with_tongue:"&gt;😜&lt;/span&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index="index_name" source="source_name" | head 20 | eval d=strptime(date,"%a_%b_%d_%H:%M:%S_%Z_%Y") | table d date


d	date
 	Tue_Oct_25_03:57:49_IDT_2022
 	Tue_Oct_25_03:57:48_IDT_2022
 	Tue_Oct_25_03:57:48_IDT_2022
 	Tue_Oct_25_03:57:47_IDT_2022&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 12:24:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643619#M222952</guid>
      <dc:creator>dtibi</dc:creator>
      <dc:date>2023-05-17T12:24:10Z</dc:date>
    </item>
    <item>
      <title>Re: Why is strptime() eval not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643622#M222954</link>
      <description>&lt;P&gt;As I said, IDT doesn't appear to be supported by Splunk's strptime() function.&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 12:40:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643622#M222954</guid>
      <dc:creator>ITWhisperer</dc:creator>
      <dc:date>2023-05-17T12:40:05Z</dc:date>
    </item>
    <item>
      <title>Re: strptime() eval not working ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643623#M222955</link>
      <description>&lt;P&gt;Thank you!!!!&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 12:42:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643623#M222955</guid>
      <dc:creator>dtibi</dc:creator>
      <dc:date>2023-05-17T12:42:53Z</dc:date>
    </item>
    <item>
      <title>Re: Why is strptime() eval not working?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643625#M222957</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/256827"&gt;@dtibi&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;yes this is the way to share code or samples that can be reused.&lt;/P&gt;&lt;P&gt;Could you share the sample logs not the results of the search?&lt;/P&gt;&lt;P&gt;Anyway, probably the solution is the one indicated by&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/225168"&gt;@ITWhisperer&lt;/a&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 12:55:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643625#M222957</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-05-17T12:55:53Z</dc:date>
    </item>
    <item>
      <title>Re: strptime() eval not working ?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643626#M222958</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/256827"&gt;@dtibi&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;good for you, see next time!&lt;/P&gt;&lt;P&gt;Ciao and happy splunking&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;P.S.: Karma Points are appreciated by all the contributors &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 17 May 2023 12:57:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Why-is-strptime-eval-not-working/m-p/643626#M222958</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-05-17T12:57:19Z</dc:date>
    </item>
  </channel>
</rss>

