<?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: Help on strftime in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650336#M110510</link>
    <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;it changes nothing&lt;/P&gt;</description>
    <pubDate>Thu, 13 Jul 2023 08:11:04 GMT</pubDate>
    <dc:creator>jip31</dc:creator>
    <dc:date>2023-07-13T08:11:04Z</dc:date>
    <item>
      <title>Help on strftime</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650124#M110483</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;I have a field time called LastLogonDate with this format&lt;/P&gt;&lt;P&gt;6/28/2023 1:47.35 PM&lt;/P&gt;&lt;P&gt;I want to format this field in a new field&amp;nbsp;&lt;/P&gt;&lt;P&gt;So i am doing&lt;/P&gt;&lt;P&gt;| eval Last=strftime(LastLogonDate, "%d-%m-%y") but it doenst works&amp;nbsp;&lt;/P&gt;&lt;P&gt;What is wrong please?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 09:23:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650124#M110483</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2023-07-12T09:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help on strftime</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650125#M110484</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;you have to operate two conversions:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Last=strftime(strptime(LastLogonDate, "%m/%d/%Y %I:%H.%S %p"),"%d-%m-%y") &lt;/LI-CODE&gt;&lt;P&gt;Only one beware: you used ":" betweeen hours and minutes and "." between minutes and seconds: is it an error or correct?&lt;/P&gt;&lt;P&gt;I followed your indication.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 09:34:09 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650125#M110484</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-07-12T09:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Help on strftime</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650133#M110485</link>
      <description>&lt;P&gt;It's an error&lt;/P&gt;&lt;P&gt;I had : in your example between H and S&lt;/P&gt;&lt;P&gt;Your example wirks but only for some LadtLogonDate value but not for all&lt;/P&gt;&lt;P&gt;What is wrong please?&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 10:02:45 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650133#M110485</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2023-07-12T10:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: Help on strftime</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650135#M110486</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;if you can confirm that the format is "&lt;SPAN&gt;6/28/2023 1:47:35 PM", it should be correct.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;As I said, check the format of the separators between hours, minutes and seconds: if one is wrong, all the formula is wrong.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Last=strftime(strptime(LastLogonDate, "%m/%d/%Y %I:%H:%S %p"),"%d-%m-%y") &lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 10:15:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650135#M110486</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-07-12T10:15:12Z</dc:date>
    </item>
    <item>
      <title>Re: Help on strftime</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650141#M110487</link>
      <description>&lt;P&gt;It's strange because 7/3/2023 8:59:14 AM returns nothing while 1/18/2916 9:15:23 AM returns well 18-01-16 even if the forkat is the same...&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 10:46:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650141#M110487</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2023-07-12T10:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Help on strftime</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650142#M110488</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;the issue is in the day format, please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Last=strftime(strptime(LastLogonDate, "%m/%e/%Y %I:%H:%S %p"),"%d-%m-%y") &lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 10:48:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650142#M110488</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-07-12T10:48:55Z</dc:date>
    </item>
    <item>
      <title>Re: Help on strftime</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650177#M110493</link>
      <description>&lt;P&gt;sorry but exactly the same issue&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 12:53:44 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650177#M110493</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2023-07-12T12:53:44Z</dc:date>
    </item>
    <item>
      <title>Re: Help on strftime</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650216#M110496</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;please try this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval Last=strftime(strptime(LastLogonDate, "%x %I:%H:%S %p"),"%d-%m-%y") &lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Wed, 12 Jul 2023 14:38:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650216#M110496</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-07-12T14:38:32Z</dc:date>
    </item>
    <item>
      <title>Re: Help on strftime</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650336#M110510</link>
      <description>&lt;P&gt;hi&lt;/P&gt;&lt;P&gt;it changes nothing&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 08:11:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650336#M110510</guid>
      <dc:creator>jip31</dc:creator>
      <dc:date>2023-07-13T08:11:04Z</dc:date>
    </item>
    <item>
      <title>Re: Help on strftime</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650351#M110513</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;I don't know why it doesn't run, so, please try this workaround:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=LastLogonDate "^(?&amp;lt;month&amp;gt;\d+)\/(?&amp;lt;day&amp;gt;\d+)\/(?&amp;lt;year&amp;gt;\d+)"
| eval day=if(day&amp;lt;10,"0".day,day), month=if(month&amp;lt;10,"0".month,month)
| eval Last=day."/".month."/".year&lt;/LI-CODE&gt;&lt;P&gt;that I tested.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Thu, 13 Jul 2023 09:41:01 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/650351#M110513</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-07-13T09:41:01Z</dc:date>
    </item>
    <item>
      <title>Re: Help on strftime</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/651570#M110662</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/102660"&gt;@jip31&lt;/a&gt;,&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 &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 22 Jul 2023 05:50:55 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/Help-on-strftime/m-p/651570#M110662</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2023-07-22T05:50:55Z</dc:date>
    </item>
  </channel>
</rss>

