<?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: calculate Time difference  in stats in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537039#M90012</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194987"&gt;@hazemfarajallah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you need the stats command to group your events, using table, you don't group events and calculate diff for each event.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
    <pubDate>Mon, 25 Jan 2021 11:43:05 GMT</pubDate>
    <dc:creator>gcusello</dc:creator>
    <dc:date>2021-01-25T11:43:05Z</dc:date>
    <item>
      <title>calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537024#M90008</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;BR /&gt;I have this query&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Index = s098_prod sourcetype=SERVER_PROD
SCRIPT_ID=6SW* NOT (name="Logout" OR name="Login" OR name="Reboot") | dedup sessionnumber | eval enddatetime=if(isNull(enddatetime), "RUNNING", enddatetime)
| eval Statustext = "From ".startdatetime. " To ".enddatetime." on ".extracted_host
| stats latest(rstatus) AS "Status" latest(Statustext) as Statustext by name&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I'm trying to calculate the time deference with the same grouping as Stats.&lt;BR /&gt;But always return Null.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 10:29:26 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537024#M90008</guid>
      <dc:creator>hazemfarajallah</dc:creator>
      <dc:date>2021-01-25T10:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537029#M90010</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194987"&gt;@hazemfarajallah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;sorry but I don't understa which difference you want to calculate: in the stats command you have only one numeric value: "Status".&lt;/P&gt;&lt;P&gt;Maybe the difference between "startdatetime" and "enddatetime""?&lt;/P&gt;&lt;P&gt;If this is your need, you have to inserta also startdatetime enddatetime in the stats command otherwise you lose this field.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;index = s098_prod sourcetype=SERVER_PROD SCRIPT_ID=6SW* NOT (name="Logout" OR name="Login" OR name="Reboot") 
| dedup sessionnumber 
| stats latest(startdatetime) AS startdatetime latest(enddatetime) AS enddatetime latest(rstatus) AS Status by name
| eval 
     enddatetime=if(isNull(enddatetime), "RUNNING", enddatetime),
     Statustext = "From ".startdatetime. " To ".enddatetime." on ".extracted_host,
     diff=if(enddatetime="RUNNING",now(),enddatetime)-startdatetime,
| table name Statustext diff&lt;/LI-CODE&gt;&lt;P&gt;In addition, you cannot execute a diff if you have strings (like "RUNNING") so transform these fields after the calculation.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 10:53:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537029#M90010</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-25T10:53:20Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537035#M90011</link>
      <description>&lt;P&gt;Hi, Thanks for answering,&amp;nbsp;&lt;BR /&gt;Yes i wanted to calculate the diff dateTime!&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;you are right i must replace the string when its "running"&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval 
     enddatetime=if(isNull(enddatetime), "RUNNING", enddatetime),
     Statustext = "From ".startdatetime. " To ".enddatetime." on ".extracted_host,
     diff=if(enddatetime="RUNNING",now(),enddatetime)-startdatetime,
| table name Statustext diff&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Now i getting&amp;nbsp; the name but still cant get the diff or&amp;nbsp;Statustext&amp;nbsp; &amp;nbsp;and i do believe i have a grouping issue&lt;BR /&gt;&lt;BR /&gt;Here i removed the table and back to stats i can see all&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| dedup sessionnumber 
| eval enddatetime=if(isNull(enddatetime), "RUNNING", enddatetime), Statustext = "From ".startdatetime. " To ".enddatetime." on ".extracted_host,     diff=if(enddatetime="RUNNING",now(),enddatetime)-startdatetime 
| stats latest(startdatetime) AS startdatetime latest(enddatetime) AS enddatetime latest(rstatus) AS Status, by name&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Any Tips&amp;nbsp;&lt;/P&gt;&lt;P&gt;I dont need Stat if i use the table&amp;nbsp; but how to group them to get the diff&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats latest(startdatetime) AS startdatetime latest(enddatetime) AS enddatetime latest(rstatus) AS Status, by name&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;Thanks in advance&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 11:25:19 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537035#M90011</guid>
      <dc:creator>hazemfarajallah</dc:creator>
      <dc:date>2021-01-25T11:25:19Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537039#M90012</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194987"&gt;@hazemfarajallah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;you need the stats command to group your events, using table, you don't group events and calculate diff for each event.&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 11:43:05 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537039#M90012</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-25T11:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537041#M90013</link>
      <description>&lt;P&gt;Thanks,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| dedup sessionnumber 
| stats latest(startdatetime) AS startdatetime latest(enddatetime) AS enddatetime latest(rstatus) AS Status by name
| eval 
     enddatetime=if(isNull(enddatetime), "RUNNING", enddatetime),  
     diff=if(enddatetime="RUNNING",now(),enddatetime)-startdatetime
| table name diff&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Here i cant group diff with stat!&lt;BR /&gt;and did try this as well but no luck&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| stats  latest(rstatus) AS Status latest(diff) AS diff by name&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;BR/hazem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 11:59:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537041#M90013</guid>
      <dc:creator>hazemfarajallah</dc:creator>
      <dc:date>2021-01-25T11:59:25Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537044#M90014</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194987"&gt;@hazemfarajallah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;what's the format of startdatetime and and enddatetime?&lt;/P&gt;&lt;P&gt;to execute a difference, you have to transform them in epochtime, so if they have format %d/%m&amp;amp;%Y %H:%M:%S, you should try using something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| dedup sessionnumber 
| stats latest(startdatetime) AS startdatetime latest(enddatetime) AS enddatetime latest(rstatus) AS Status by name
| eval 
     enddatetime=if(isNull(enddatetime), "RUNNING", strptime(enddatetime),"%d/%m&amp;amp;%Y %H:%M:%S")), 
     startdatetime=strptime(startdatetime),"%d/%m&amp;amp;%Y %H:%M:%S"), 
     diff=if(enddatetime="RUNNING",now(),enddatetime)-startdatetime
| table name diff&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>Mon, 25 Jan 2021 12:10:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537044#M90014</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-25T12:10:18Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537047#M90015</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;not sure&amp;nbsp; but i know its a CSV file generated.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;strptime&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;is not working even i checked the replacement is working i check the enddatetime&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval 
     enddatetime=if(isNull(enddatetime),"RUNNING", strptime(enddatetime,"%d/%m&amp;amp;%Y %H:%M:%S")), 
     startdatetime=strptime(startdatetime,"%d/%m&amp;amp;%Y %H:%M:%S"), 
     diff=if(enddatetime="RUNNING",now(),enddatetime)-startdatetime
| table name enddatetime&lt;/LI-CODE&gt;&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;If i go back to status its look like this&amp;nbsp;&lt;SPAN&gt;From 25.01.2021 13:30:05 To 25.01.2021 13:30:27 &lt;/SPAN&gt;&lt;BR /&gt;But not sure why striptime is not working!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;BR/hazem&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 12:39:08 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537047#M90015</guid>
      <dc:creator>hazemfarajallah</dc:creator>
      <dc:date>2021-01-25T12:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537053#M90017</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194987"&gt;@hazemfarajallah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;as I said, to calculate a diff, you have to transform both the dates in epochtime.&lt;/P&gt;&lt;P&gt;So, could you share a sample of your dates?&lt;/P&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 13:46:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537053#M90017</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-25T13:46:34Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537058#M90018</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp; Thanks for helping .&lt;BR /&gt;&lt;BR /&gt;Here is sample&amp;nbsp; event&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;6SWE_EE_PROD1;25.01.2021 14:56:01;18693;25.01.2021 03:00:07;25.01.2021 03:03:51;;Completed;&amp;lt;inputs /&amp;gt;;;;;;;1 - Load Purchasing Documents To Queue;HP4E148770;;&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&lt;BR /&gt;I attached a photo with the fields.&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&lt;BR /&gt;&lt;/SPAN&gt;BR/hazem&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 14:03:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537058#M90018</guid>
      <dc:creator>hazemfarajallah</dc:creator>
      <dc:date>2021-01-25T14:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537065#M90021</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194987"&gt;@hazemfarajallah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;image isn't available, but I have the information I need: the format of your fields, so please try this search:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval 
     enddatetime=if(isNull(enddatetime),"RUNNING", strptime(enddatetime,"%d.%m.%Y %H:%M:%S")), 
     startdatetime=strptime(startdatetime,"%d.%m.%Y %H:%M:%S"), 
     diff=if(enddatetime="RUNNING",now(),enddatetime)-startdatetime
| table name enddatetime&lt;/LI-CODE&gt;&lt;P&gt;If it continue to fail, please run this and show me the result: one eample of closed transaction (with both startdatetime and enddatetime) and a running transaction (with only startdatetime).&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval 
     enddatetime=if(isNull(enddatetime),"RUNNING", strptime(enddatetime,"%d.%m.%Y %H:%M:%S")), 
     startdatetime=strptime(startdatetime,"%d.%m.%Y %H:%M:%S"), 
     diff=if(enddatetime="RUNNING",now(),enddatetime)-startdatetime
| table name enddatetime startdatetime enddatetime diff&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jan 2021 14:57:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537065#M90021</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-25T14:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537214#M90043</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp; its works like a charm &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp; for getting the Diff.&lt;/P&gt;&lt;P&gt;But i dont use stat anymore! and i sort by -enddatetime.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| dedup sessionnumber 
| eval 
    enddatetime=if(isNull(enddatetime),"RUNNING", strptime(enddatetime,"%d.%m.%Y %H:%M:%S")), 
     startdatetime=strptime(startdatetime,"%d.%m.%Y %H:%M:%S"), 
     diff=if(enddatetime="RUNNING",now(),enddatetime)-startdatetime
    | table name enddatetime startdatetime enddatetime diff rstatus extracted_host
    |sort -enddatetime&lt;/LI-CODE&gt;&lt;P&gt;Output&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;name	enddatetime	startdatetime	diff	rstatus	extracted_host
EED-SM-002-TSH-Populate Queue	1611639006.000000	1611639004.000000	2.000000	Terminated	HP4E148755
EKS-006-PDF-Main	1611662583.000000	1611662482.000000	101.000000	Completed	HP4E148784
EED-SM-002-TSH-Populate Queue	1611647467.000000	1611647437.000000	30.000000	Completed	HP4E148784
EKS-006-PDF-Populate Queue	1611662478.000000	1611662404.000000	74.000000	Completed	HP4E148784
BIT-IAM-001-KID-Report	1611650651.000000	1611650636.000000	15.000000	Completed	HP4E148784&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks alot for your help,&amp;nbsp;&lt;BR /&gt;but can you explain to me how this working without stat!&amp;nbsp;&lt;BR /&gt;BR/Hazem&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 14:03:42 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537214#M90043</guid>
      <dc:creator>hazemfarajallah</dc:creator>
      <dc:date>2021-01-26T14:03:42Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537215#M90044</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194987"&gt;@hazemfarajallah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Good for you.&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>Tue, 26 Jan 2021 14:04:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537215#M90044</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-26T14:04:41Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537220#M90045</link>
      <description>&lt;P&gt;Hi again,&lt;BR /&gt;&lt;BR /&gt;How i can convert this time diff, per minute?&lt;BR /&gt;&lt;BR /&gt;I have diff/60 but sounds very strange number&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 15:01:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537220#M90045</guid>
      <dc:creator>hazemfarajallah</dc:creator>
      <dc:date>2021-01-26T15:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537222#M90047</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194987"&gt;@hazemfarajallah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;it works because you have bothe the timestamps (stats and end) in the same event.&lt;/P&gt;&lt;P&gt;If instead you have only one timestamp in each event, you have to use stats.&lt;/P&gt;&lt;P&gt;Anyway.&lt;/P&gt;&lt;P&gt;Ciao and good splunking.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 15:10:52 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537222#M90047</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-26T15:10:52Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537226#M90048</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194987"&gt;@hazemfarajallah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;check if you have seconds or milliseconds.&lt;/P&gt;&lt;P&gt;Ciao,&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 15:20:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537226#M90048</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-26T15:20:13Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537255#M90053</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/161352"&gt;@gcusello&lt;/a&gt;&amp;nbsp;&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;its like this&amp;nbsp;&lt;SPAN&gt;4899.000000&amp;nbsp;&amp;nbsp;&lt;BR /&gt;with milliseconds!&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;The closet i got is&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt; | fieldformat "timeCount" = round((timeCount / 100), 3)&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;But not really working !&lt;BR /&gt;&lt;BR /&gt;BR/hazem&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 17:03:41 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537255#M90053</guid>
      <dc:creator>hazemfarajallah</dc:creator>
      <dc:date>2021-01-26T17:03:41Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537257#M90054</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/194987"&gt;@hazemfarajallah&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;try adding something like this:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| eval timeCount=round(timeCount,0)&lt;/LI-CODE&gt;&lt;P&gt;if it doesn't run, try:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;| rex field=timeCount "^(?&amp;lt;timeCount&amp;gt;\d+)"&lt;/LI-CODE&gt;&lt;P&gt;Ciao.&lt;/P&gt;&lt;P&gt;Giuseppe&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 17:11:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537257#M90054</guid>
      <dc:creator>gcusello</dc:creator>
      <dc:date>2021-01-26T17:11:25Z</dc:date>
    </item>
    <item>
      <title>Re: calculate Time difference  in stats</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537286#M90057</link>
      <description>&lt;P&gt;Thanks its working :).&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;BR/hazem&lt;/P&gt;</description>
      <pubDate>Tue, 26 Jan 2021 19:18:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/calculate-Time-difference-in-stats/m-p/537286#M90057</guid>
      <dc:creator>hazemfarajallah</dc:creator>
      <dc:date>2021-01-26T19:18:47Z</dc:date>
    </item>
  </channel>
</rss>

