<?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: Trying to create and populate a ProcessingTime field from 2 time fileds in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Trying-to-create-and-populate-a-ProcessingTime-field-from-2-time/m-p/548541#M155600</link>
    <description>&lt;P&gt;Yes, you can, using &lt;STRONG&gt;tostring&lt;/STRONG&gt; function.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;host=clbflncolp11 index=_* OR index=* sourcetype=ibm:was:icc source="D:\\IBM_ICC_AuditLogs\\ibm.ctms.taskrouting.auditlog-SalesActiveIngestion*.log"
| eval ProcessingTime=tostring(strptime(file_modified, "+%Y-%m-%dT%H:%M:%S:%3N%:z-%Z")-strptime(file_created, "+%Y-%m-%dT%H:%M:%S:%3N%:z-%Z"), "duration")
| table ProcessingTime, file_modified, file_created, corp_copy_dt&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you, a like would be appreciated.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 20 Apr 2021 06:40:27 GMT</pubDate>
    <dc:creator>manjunathmeti</dc:creator>
    <dc:date>2021-04-20T06:40:27Z</dc:date>
    <item>
      <title>Trying to create and populate a ProcessingTime field from 2 time fileds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-to-create-and-populate-a-ProcessingTime-field-from-2-time/m-p/548485#M155581</link>
      <description>&lt;P&gt;I have a log that that has multiple utc times listed. The logs are ingested into Splunk and I have created a field extraction to show those times in my Splunk table query. Now I am trying to populate the ProcessingTime with the difference between two of the fields. I'm missing something. Can't get the ProcessingTime to populate. Any help would be great.&lt;/P&gt;&lt;P&gt;Query:&lt;BR /&gt;host=clbflncolp11 index=_* OR index=* sourcetype=ibm:was:icc source="D:\\IBM_ICC_AuditLogs\\ibm.ctms.taskrouting.auditlog-SalesActiveIngestion*.log"&lt;BR /&gt;| eval ProcessingTime=file_modified-file_created&lt;BR /&gt;| table ProcessingTime, file_modified, file_created, corp_copy_dt&lt;BR /&gt;&lt;BR /&gt;Sample Result:&lt;/P&gt;&lt;P&gt;ProcessingTime file_modified file_created corp_copy_dt &amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;+2021-04-19T18:15:19:564+00:00-UTC&lt;/TD&gt;&lt;TD&gt;+2021-04-19T18:15:19:299+00:00-UTC&lt;/TD&gt;&lt;TD&gt;+2021-04-19T15:15:19:000+00:00-UTC&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;+2021-04-19T18:15:18:955+00:00-UTC&lt;/TD&gt;&lt;TD&gt;+2021-04-19T18:15:18:689+00:00-UTC&lt;/TD&gt;&lt;TD&gt;+2021-04-19T15:15:19:000+00:00-UTC&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;+2021-04-19T18:15:20:470+00:00-UTC&lt;/TD&gt;&lt;TD&gt;+2021-04-19T18:15:19:924+00:00-UTC&lt;/TD&gt;&lt;TD&gt;+2021-04-19T15:15:20:000+00:00-UTC&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;+2021-04-19T18:15:21:205+00:00-UTC&lt;/TD&gt;&lt;TD&gt;+2021-04-19T18:15:20:861+00:00-UTC&lt;/TD&gt;&lt;TD&gt;+2021-04-19T15:15:21:000+00:00-UTC&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Mon, 19 Apr 2021 18:55:49 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-to-create-and-populate-a-ProcessingTime-field-from-2-time/m-p/548485#M155581</guid>
      <dc:creator>kesrich</dc:creator>
      <dc:date>2021-04-19T18:55:49Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create and populate a ProcessingTime field from 2 time fileds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-to-create-and-populate-a-ProcessingTime-field-from-2-time/m-p/548491#M155583</link>
      <description>&lt;P&gt;hi&amp;nbsp;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/222944"&gt;@kesrich&lt;/a&gt;,&lt;BR /&gt;You need to convert date time to epoch time and then calculate the difference. Below query gives&amp;nbsp;ProcessingTime in hours.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;host=clbflncolp11 index=_* OR index=* sourcetype=ibm:was:icc source="D:\\IBM_ICC_AuditLogs\\ibm.ctms.taskrouting.auditlog-SalesActiveIngestion*.log"
| eval ProcessingTime=round((strptime(file_modified, "+%Y-%m-%dT%H:%M:%S:%3N%:z-%Z")-strptime(file_created, "+%Y-%m-%dT%H:%M:%S:%3N%:z-%Z"))/3600, 2)
| table ProcessingTime, file_modified, file_created, corp_copy_dt&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you, a like would be appreciated.&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 19:19:10 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-to-create-and-populate-a-ProcessingTime-field-from-2-time/m-p/548491#M155583</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-04-19T19:19:10Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create and populate a ProcessingTime field from 2 time fileds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-to-create-and-populate-a-ProcessingTime-field-from-2-time/m-p/548495#M155585</link>
      <description>&lt;P&gt;&lt;a href="https://community.splunk.com/t5/user/viewprofilepage/user-id/129090"&gt;@manjunathmeti&lt;/a&gt;&amp;nbsp;&lt;BR /&gt;This looks like a great start, but can we remove the "round" option? And is there a way to format the display of the ProcessingTime? I need the milliseconds of this. Thanks for the quick reply!!&lt;/P&gt;</description>
      <pubDate>Mon, 19 Apr 2021 20:08:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-to-create-and-populate-a-ProcessingTime-field-from-2-time/m-p/548495#M155585</guid>
      <dc:creator>kesrich</dc:creator>
      <dc:date>2021-04-19T20:08:14Z</dc:date>
    </item>
    <item>
      <title>Re: Trying to create and populate a ProcessingTime field from 2 time fileds</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Trying-to-create-and-populate-a-ProcessingTime-field-from-2-time/m-p/548541#M155600</link>
      <description>&lt;P&gt;Yes, you can, using &lt;STRONG&gt;tostring&lt;/STRONG&gt; function.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;host=clbflncolp11 index=_* OR index=* sourcetype=ibm:was:icc source="D:\\IBM_ICC_AuditLogs\\ibm.ctms.taskrouting.auditlog-SalesActiveIngestion*.log"
| eval ProcessingTime=tostring(strptime(file_modified, "+%Y-%m-%dT%H:%M:%S:%3N%:z-%Z")-strptime(file_created, "+%Y-%m-%dT%H:%M:%S:%3N%:z-%Z"), "duration")
| table ProcessingTime, file_modified, file_created, corp_copy_dt&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If this reply helps you, a like would be appreciated.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 20 Apr 2021 06:40:27 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Trying-to-create-and-populate-a-ProcessingTime-field-from-2-time/m-p/548541#M155600</guid>
      <dc:creator>manjunathmeti</dc:creator>
      <dc:date>2021-04-20T06:40:27Z</dc:date>
    </item>
  </channel>
</rss>

