<?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 to edit timestamp to one day previously? in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398586#M115605</link>
    <description>&lt;P&gt;Oh, I deleted it cause I thought that it would not work for you.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=diags sourcetype=diags_assigned_gdc 
| timechart span=1d dc(Call No) as "Assigned" 
| rename _time as time 
| eval time=strftime(time-86400,"%Y-%m-%d")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please accept it if it works for you.&lt;/P&gt;</description>
    <pubDate>Tue, 15 May 2018 12:02:28 GMT</pubDate>
    <dc:creator>mayurr98</dc:creator>
    <dc:date>2018-05-15T12:02:28Z</dc:date>
    <item>
      <title>How to edit timestamp to one day previously?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398580#M115599</link>
      <description>&lt;P&gt;I have a report running in SPLUNK on a daily basis. The timestamp for this report is the "Report Date" field (i.e. today). However, the events are actually from the previous day.&lt;/P&gt;

&lt;P&gt;Therefore am I able to run a calculation either in the config file or at search time for ("Report Date"-1d@d). This would then mean the events are timestamped for the correct day.&lt;/P&gt;

&lt;P&gt;Thanks in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 08:32:56 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398580#M115599</guid>
      <dc:creator>jackreeves</dc:creator>
      <dc:date>2018-05-15T08:32:56Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit timestamp to one day previously?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398581#M115600</link>
      <description>&lt;P&gt;can you provide search query?&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 09:57:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398581#M115600</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-05-15T09:57:49Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit timestamp to one day previously?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398582#M115601</link>
      <description>&lt;P&gt;index=diags sourcetype=diags_assigned&lt;BR /&gt;
| timechart span=1d dc(Call No) as "Assigned" &lt;/P&gt;

&lt;P&gt;This will provide me with following data for previous 7 days:&lt;BR /&gt;
15/05/2018 &lt;BR /&gt;
14/05/2018&lt;BR /&gt;
13/05/2018&lt;BR /&gt;
12/05/2018&lt;BR /&gt;
11/05/2018&lt;BR /&gt;
10/05/2018&lt;BR /&gt;
09/05/2018&lt;/P&gt;

&lt;P&gt;However really the data for the 15/05/2018 should be 14/05/2018 &amp;amp; 14/05/2018 should be 13/05/2018 and so on. Essentially changing _time to -1d@d&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 10:51:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398582#M115601</guid>
      <dc:creator>jackreeves</dc:creator>
      <dc:date>2018-05-15T10:51:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit timestamp to one day previously?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398583#M115602</link>
      <description>&lt;P&gt;index=diags sourcetype=diags_assigned_gdc &lt;BR /&gt;
| timechart span=1d dc(Call No) as "Assigned" &lt;/P&gt;

&lt;P&gt;However the timestamp is always one day in the future (i.e. 15/05/2018 should really be 14/05/2018). This is because I am using a "Report Date" field in my data, when the events are always -1d@d behind.&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:32:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398583#M115602</guid>
      <dc:creator>jackreeves</dc:creator>
      <dc:date>2020-09-29T19:32:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit timestamp to one day previously?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398584#M115603</link>
      <description>&lt;P&gt;@jackreeves, if your current Time picker selection is Today i.e. earliest=@d and latest=now, you should change it to &lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;earliest=-1d@d and latest=-1d@s
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please try out and confirm!&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 11:02:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398584#M115603</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2018-05-15T11:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit timestamp to one day previously?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398585#M115604</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/172209"&gt;@mayurr98&lt;/a&gt; - bizarrely can't see your latest comment but it has worked a charm &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt; &lt;/P&gt;

&lt;P&gt;Answer:&lt;BR /&gt;
 index=diags sourcetype=diags_assigned_gdc &lt;BR /&gt;
 | timechart span=1d dc(Call No) as "Assigned" &lt;BR /&gt;
 | rename _time as time &lt;BR /&gt;
 | eval time=strftime(time-86400,"%Y-%m-%d")&lt;/P&gt;

&lt;P&gt;Thanks both for your help&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:32:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398585#M115604</guid>
      <dc:creator>jackreeves</dc:creator>
      <dc:date>2020-09-29T19:32:26Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit timestamp to one day previously?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398586#M115605</link>
      <description>&lt;P&gt;Oh, I deleted it cause I thought that it would not work for you.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=diags sourcetype=diags_assigned_gdc 
| timechart span=1d dc(Call No) as "Assigned" 
| rename _time as time 
| eval time=strftime(time-86400,"%Y-%m-%d")
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Please accept it if it works for you.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 12:02:28 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398586#M115605</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-05-15T12:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit timestamp to one day previously?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398587#M115606</link>
      <description>&lt;P&gt;Works perfectly. How would this work using chart command? Where Date is following format "Y/m/d" &amp;amp; is not the timestamp?&lt;/P&gt;

&lt;P&gt;Search:&lt;BR /&gt;
index=diags sourcetype=diags_closed_gdc&lt;BR /&gt;
| chart dc(Call No) as "Closures" over "Category" by "Date" useother=f limit=100&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
Jack&lt;/P&gt;</description>
      <pubDate>Tue, 29 Sep 2020 19:32:31 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398587#M115606</guid>
      <dc:creator>jackreeves</dc:creator>
      <dc:date>2020-09-29T19:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit timestamp to one day previously?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398588#M115607</link>
      <description>&lt;P&gt;Try this&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;index=diags sourcetype=diags_closed_gdc 
| eval Date=strftime(strptime(Date,"%Y/%m/%d")-86400,"%Y/%m/%d") 
| chart dc(Call No) as "Closures" over "Category" by "Date" useother=f limit=100
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 15 May 2018 12:17:59 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398588#M115607</guid>
      <dc:creator>mayurr98</dc:creator>
      <dc:date>2018-05-15T12:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to edit timestamp to one day previously?</title>
      <link>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398589#M115608</link>
      <description>&lt;P&gt;Again that has worked perfectly! &lt;/P&gt;

&lt;P&gt;Thank you so much for your help.&lt;/P&gt;</description>
      <pubDate>Tue, 15 May 2018 13:48:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/How-to-edit-timestamp-to-one-day-previously/m-p/398589#M115608</guid>
      <dc:creator>jackreeves</dc:creator>
      <dc:date>2018-05-15T13:48:14Z</dc:date>
    </item>
  </channel>
</rss>

