<?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: Formatting my date in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Formatting-my-date/m-p/325057#M160898</link>
    <description>&lt;P&gt;add eval into your Time command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;values(eval(strftime(_time, "%d/%m/%Y"))) as Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Thu, 01 Jun 2017 17:42:00 GMT</pubDate>
    <dc:creator>cmerriman</dc:creator>
    <dc:date>2017-06-01T17:42:00Z</dc:date>
    <item>
      <title>Formatting my date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Formatting-my-date/m-p/325055#M160896</link>
      <description>&lt;P&gt;Below is my report but my date output is blank, i am searching for powershell events on my network and need to know what date these events occurred, any suggestions?  &lt;/P&gt;

&lt;P&gt;sourcetype="symantec:ep:risk:file" index=security_sep application_name ="*.ps1"  | stats count as Event_Count values(user) as User values(computer_name) as Computer_Name values(category) as Category values(application_name) as Application_Name  values(strftime(_time, "%d/%m/%Y")) as Time by ip_address| sort -Event_Count _time&lt;/P&gt;

&lt;P&gt;Thanks much.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 14:18:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Formatting-my-date/m-p/325055#M160896</guid>
      <dc:creator>rickettw</dc:creator>
      <dc:date>2020-09-29T14:18:04Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting my date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Formatting-my-date/m-p/325056#M160897</link>
      <description>&lt;P&gt;Your stats search named the values() function output Time, so _time isn't available.  Try changing your sort to:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sort -Event_Count Time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Or change your values() function to name the field _time.&lt;/P&gt;

&lt;P&gt;Edit:  and change your values() function to use eval(), as per the answer below.&lt;/P&gt;</description>
      <pubDate>Thu, 01 Jun 2017 17:40:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Formatting-my-date/m-p/325056#M160897</guid>
      <dc:creator>micahkemp</dc:creator>
      <dc:date>2017-06-01T17:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting my date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Formatting-my-date/m-p/325057#M160898</link>
      <description>&lt;P&gt;add eval into your Time command.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;values(eval(strftime(_time, "%d/%m/%Y"))) as Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Jun 2017 17:42:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Formatting-my-date/m-p/325057#M160898</guid>
      <dc:creator>cmerriman</dc:creator>
      <dc:date>2017-06-01T17:42:00Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting my date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Formatting-my-date/m-p/325058#M160899</link>
      <description>&lt;P&gt;I've had mixed results using &lt;CODE&gt;eval&lt;/CODE&gt; within &lt;CODE&gt;stats&lt;/CODE&gt; so I would use a separate &lt;CODE&gt;eval&lt;/CODE&gt;.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt; sourcetype="symantec:ep:risk:file" index=security_sep application_name ="*.ps1" | eval Time=strftime(_time, "%d/%m/%Y") | stats count as Event_Count values(user) as User values(computer_name) as Computer_Name values(category) as Category values(application_name) as Application_Name values(Time) as Time by ip_address| sort -Event_Count Time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Jun 2017 18:04:04 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Formatting-my-date/m-p/325058#M160899</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2017-06-01T18:04:04Z</dc:date>
    </item>
    <item>
      <title>Re: Formatting my date</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Formatting-my-date/m-p/325059#M160900</link>
      <description>&lt;P&gt;Try this:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;sourcetype="symantec:ep:risk:file" index=security_sep application_name ="*.ps1"
| stats count as Event_Count list(user) as User list(computer_name) as Computer_Name list(category) as Category list(application_name) as Application_Name list(eval(strftime(_time, "%d/%m/%Y"))) as Time by ip_address
| sort -Event_Count _time
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 01 Jun 2017 18:05:21 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Formatting-my-date/m-p/325059#M160900</guid>
      <dc:creator>woodcock</dc:creator>
      <dc:date>2017-06-01T18:05:21Z</dc:date>
    </item>
  </channel>
</rss>

