<?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 Help with dur2sec function not displaying in Splunk Search</title>
    <link>https://community.splunk.com/t5/Splunk-Search/Help-with-dur2sec-function-not-displaying/m-p/479898#M134502</link>
    <description>&lt;P&gt;Hi&lt;BR /&gt;
 I am having an issue with the result of my dur2sec function not displaying.&lt;BR /&gt;
 Here is the SPL. I am still new to splunk so have put what I believe I am doing alongside the query. &lt;/P&gt;

&lt;P&gt;|eval Entrytimestamp=strptime(ENTRY, "%d.%m.%Y %H:%M:%S") -- convert the ENTRY field date string to a proper date format &lt;BR /&gt;
|eval dwellTime_S = tostring(now()-Entrytimestamp,"duration") -- get the duration string and assign it to variable dwellTime_S&lt;BR /&gt;
|convert dur2sec(dwellTime_S) AS dwellTime_C  -- convert the dwellTime string variable to seconds and assign to dwellTime_C variable&lt;/P&gt;

&lt;P&gt;When i then use the dwellTime_C in a table the column is blank. Please can anyone help and advise where I am going wrong ?&lt;/P&gt;

&lt;P&gt;Many Thanks&lt;/P&gt;

&lt;P&gt;PS: I am not in the office tomorrow so wont be able to reply immediately.&lt;/P&gt;</description>
    <pubDate>Wed, 30 Sep 2020 02:10:33 GMT</pubDate>
    <dc:creator>PBerry7538</dc:creator>
    <dc:date>2020-09-30T02:10:33Z</dc:date>
    <item>
      <title>Help with dur2sec function not displaying</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-dur2sec-function-not-displaying/m-p/479898#M134502</link>
      <description>&lt;P&gt;Hi&lt;BR /&gt;
 I am having an issue with the result of my dur2sec function not displaying.&lt;BR /&gt;
 Here is the SPL. I am still new to splunk so have put what I believe I am doing alongside the query. &lt;/P&gt;

&lt;P&gt;|eval Entrytimestamp=strptime(ENTRY, "%d.%m.%Y %H:%M:%S") -- convert the ENTRY field date string to a proper date format &lt;BR /&gt;
|eval dwellTime_S = tostring(now()-Entrytimestamp,"duration") -- get the duration string and assign it to variable dwellTime_S&lt;BR /&gt;
|convert dur2sec(dwellTime_S) AS dwellTime_C  -- convert the dwellTime string variable to seconds and assign to dwellTime_C variable&lt;/P&gt;

&lt;P&gt;When i then use the dwellTime_C in a table the column is blank. Please can anyone help and advise where I am going wrong ?&lt;/P&gt;

&lt;P&gt;Many Thanks&lt;/P&gt;

&lt;P&gt;PS: I am not in the office tomorrow so wont be able to reply immediately.&lt;/P&gt;</description>
      <pubDate>Wed, 30 Sep 2020 02:10:33 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-dur2sec-function-not-displaying/m-p/479898#M134502</guid>
      <dc:creator>PBerry7538</dc:creator>
      <dc:date>2020-09-30T02:10:33Z</dc:date>
    </item>
    <item>
      <title>Re: Help with dur2sec function not displaying</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-dur2sec-function-not-displaying/m-p/479899#M134503</link>
      <description>&lt;P&gt;Why not skip the middle step?  &lt;CODE&gt;now()-Entrytimestamp&lt;/CODE&gt; is in seconds so there's no need to convert.&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;| eval Entrytimestamp=strptime(ENTRY, "%d.%m.%Y %H:%M:%S")
| eval dwellTime_C = now()-Entrytimestamp
| eval dwellTime_S = tostring(dwellTime_C, "duration")
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 12 Sep 2019 00:27:47 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-dur2sec-function-not-displaying/m-p/479899#M134503</guid>
      <dc:creator>richgalloway</dc:creator>
      <dc:date>2019-09-12T00:27:47Z</dc:date>
    </item>
    <item>
      <title>Re: Help with dur2sec function not displaying</title>
      <link>https://community.splunk.com/t5/Splunk-Search/Help-with-dur2sec-function-not-displaying/m-p/479900#M134504</link>
      <description>&lt;P&gt;Thanks Rich &lt;/P&gt;</description>
      <pubDate>Fri, 13 Sep 2019 09:34:30 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Splunk-Search/Help-with-dur2sec-function-not-displaying/m-p/479900#M134504</guid>
      <dc:creator>PBerry7538</dc:creator>
      <dc:date>2019-09-13T09:34:30Z</dc:date>
    </item>
  </channel>
</rss>

