<?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: change format of token $job.earliesttime$ in Alerting</title>
    <link>https://community.splunk.com/t5/Alerting/change-format-of-token-job-earliesttime/m-p/449200#M7909</link>
    <description>&lt;P&gt;ctime isnt working ..error is-&amp;gt;"Error in 'convert' command: The conversion specifier is invalid. It must be convert_type(key).". please help&lt;/P&gt;</description>
    <pubDate>Thu, 27 Jun 2019 05:14:34 GMT</pubDate>
    <dc:creator>ajitshukla61116</dc:creator>
    <dc:date>2019-06-27T05:14:34Z</dc:date>
    <item>
      <title>change format of token $job.earliesttime$</title>
      <link>https://community.splunk.com/t5/Alerting/change-format-of-token-job-earliesttime/m-p/449195#M7904</link>
      <description>&lt;P&gt;Hi,&lt;BR /&gt;
 I have an alert query  which runs after every 30 minutes and has a  relative time range of last 30 minutes. There is a mail action triggered on this search in which i have send $job.earliesttime$ and $ job.latesttime$ which gives me the time period of this search but i need to change the format of this time period to utc .&lt;BR /&gt;
How can i do it.&lt;BR /&gt;
Please help&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 05:55:16 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/change-format-of-token-job-earliesttime/m-p/449195#M7904</guid>
      <dc:creator>ajitshukla61116</dc:creator>
      <dc:date>2019-06-26T05:55:16Z</dc:date>
    </item>
    <item>
      <title>Re: change format of token $job.earliesttime$</title>
      <link>https://community.splunk.com/t5/Alerting/change-format-of-token-job-earliesttime/m-p/449196#M7905</link>
      <description>&lt;P&gt;| convert ctime($job.earliesttime$) ctime($ job.latesttime$)&lt;/P&gt;

&lt;P&gt;This should work.&lt;/P&gt;</description>
      <pubDate>Wed, 26 Jun 2019 14:41:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/change-format-of-token-job-earliesttime/m-p/449196#M7905</guid>
      <dc:creator>sandeepmakkena</dc:creator>
      <dc:date>2019-06-26T14:41:41Z</dc:date>
    </item>
    <item>
      <title>Re: change format of token $job.earliesttime$</title>
      <link>https://community.splunk.com/t5/Alerting/change-format-of-token-job-earliesttime/m-p/449197#M7906</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/170986"&gt;@ajitshukla61116&lt;/a&gt; You can pipe the &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/Addinfo" target="_blank"&gt;addinfo&lt;/A&gt; command to your existing search for alert and get info_min_time and info_max_time as earliest and latest time as epoch. Then you can use &lt;A href="https://docs.splunk.com/Documentation/Splunk/latest/SearchReference/DateandTimeFunctions#strftime.28X.2CY.29" target="_blank"&gt;strftime()&lt;/A&gt; to convert epoch time to your expected string time.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 01:03:50 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/change-format-of-token-job-earliesttime/m-p/449197#M7906</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2020-09-30T01:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: change format of token $job.earliesttime$</title>
      <link>https://community.splunk.com/t5/Alerting/change-format-of-token-job-earliesttime/m-p/449198#M7907</link>
      <description>&lt;P&gt;Convert ctime is not working.Error is -&amp;gt;"Error in 'convert' command: The conversion specifier is invalid. It must be convert_type(key)."&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 04:45:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/change-format-of-token-job-earliesttime/m-p/449198#M7907</guid>
      <dc:creator>ajitshukla61116</dc:creator>
      <dc:date>2019-06-27T04:45:30Z</dc:date>
    </item>
    <item>
      <title>Re: change format of token $job.earliesttime$</title>
      <link>https://community.splunk.com/t5/Alerting/change-format-of-token-job-earliesttime/m-p/449199#M7908</link>
      <description>&lt;P&gt;can you please help me how to do it&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 05:08:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/change-format-of-token-job-earliesttime/m-p/449199#M7908</guid>
      <dc:creator>ajitshukla61116</dc:creator>
      <dc:date>2019-06-27T05:08:08Z</dc:date>
    </item>
    <item>
      <title>Re: change format of token $job.earliesttime$</title>
      <link>https://community.splunk.com/t5/Alerting/change-format-of-token-job-earliesttime/m-p/449200#M7909</link>
      <description>&lt;P&gt;ctime isnt working ..error is-&amp;gt;"Error in 'convert' command: The conversion specifier is invalid. It must be convert_type(key).". please help&lt;/P&gt;</description>
      <pubDate>Thu, 27 Jun 2019 05:14:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/change-format-of-token-job-earliesttime/m-p/449200#M7909</guid>
      <dc:creator>ajitshukla61116</dc:creator>
      <dc:date>2019-06-27T05:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: change format of token $job.earliesttime$</title>
      <link>https://community.splunk.com/t5/Alerting/change-format-of-token-job-earliesttime/m-p/449201#M7910</link>
      <description>&lt;P&gt;As @niketnilay mentioned, &lt;BR /&gt;
1. You can use &lt;CODE&gt;addinfo&lt;/CODE&gt; command to get '&lt;EM&gt;Job search time&lt;/EM&gt;'. &lt;BR /&gt;
2. Format the timestamp using &lt;CODE&gt;strftime&lt;/CODE&gt; as below.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| makeresults 
| eval message="My Email Message"
| addinfo
| eval job_search_time=strftime(info_search_time,"%d-%m-%Y")
| table message,job_search_time
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;--&lt;/P&gt;

&lt;P&gt;And, you can  include the custom field in your email subject/body using &lt;CODE&gt;$result.job_search_time$&lt;/CODE&gt; field.&lt;/P&gt;</description>
      <pubDate>Thu, 05 Sep 2019 01:02:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Alerting/change-format-of-token-job-earliesttime/m-p/449201#M7910</guid>
      <dc:creator>jawaharas</dc:creator>
      <dc:date>2019-09-05T01:02:26Z</dc:date>
    </item>
  </channel>
</rss>

