<?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 convert 64-bit number from decimal to hex in Dashboards &amp; Visualizations</title>
    <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364505#M39317</link>
    <description>&lt;P&gt;@helge, I tested on &lt;CODE&gt;Splunk Enterprise 7.0&lt;/CODE&gt; on &lt;CODE&gt;Windows 10 64 bit&lt;/CODE&gt; and can see the issue with &lt;CODE&gt;tostring(64bitInteger,"hex")&lt;/CODE&gt; converting to 32 bit Hexadecimal number. Please add a bug tag to your question and report the same to Splunk Support through your Splunk Entitlement.  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Workaround: Try using &lt;CODE&gt;printf()&lt;/CODE&gt; command, with argument as &lt;CODE&gt;%X&lt;/CODE&gt;, to convert to 64-bit hexadecimal.&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;Following is the run anywhere search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|  makeresults
|  eval data="140726995023972"
|  eval dataHexUsingTostring=tostring(140726995023972, "hex")
|  eval dataHexUsingPrintf=printf("%X",data)
|  table data dataHexUsingTostring dataHexUsingPrintf
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is the output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;data               dataHexUsingTostring dataHexUsingPrintf
140726995023972 0x8E8C7864            7FFD8E8C7864
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Mon, 20 Nov 2017 20:31:12 GMT</pubDate>
    <dc:creator>niketn</dc:creator>
    <dc:date>2017-11-20T20:31:12Z</dc:date>
    <item>
      <title>How to convert 64-bit number from decimal to hex</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364500#M39312</link>
      <description>&lt;P&gt;I would like to convert 64-bit numbers stored as decimal integers to a hexadecimal representation.&lt;BR /&gt;
I am aware of the &lt;CODE&gt;eval&lt;/CODE&gt; command &lt;CODE&gt;tostring(dec, "hex")&lt;/CODE&gt;. It works well enough but seems to be limited to 32-bit integers.&lt;/P&gt;

&lt;P&gt;Example: &lt;CODE&gt;tostring(140726995023972, "hex")&lt;/CODE&gt; gives me 0x8E8C7864. The correct result would be 0x7FFD8E8C7864.&lt;/P&gt;

&lt;P&gt;My question: &lt;STRONG&gt;is this documented?&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;I found this on Splunk 6.5.3 on Windows.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 01:50:40 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364500#M39312</guid>
      <dc:creator>helge</dc:creator>
      <dc:date>2017-06-27T01:50:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert 64-bit number from decimal to hex</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364501#M39313</link>
      <description>&lt;P&gt;that is a good catch. just for our reference, i am on splunk 6.3.4 on linux, it works fine. &lt;/P&gt;

&lt;PRE&gt;| makeresults | eval number=140726995023972 | eval newnumber = tostring(140726995023972, "hex") |  table number newnumber &lt;/PRE&gt;

&lt;P&gt;PS - tried to post as a comment, but comment wont allow photos upload, thus posting it as a answer.&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/3100i0FE04D393079E660/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 02:48:34 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364501#M39313</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-06-27T02:48:34Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert 64-bit number from decimal to hex</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364502#M39314</link>
      <description>&lt;P&gt;Thanks for verifying on a different platform. I tried your exact search, too, and it confirms my findings. On Windows 6.5.3 it gives me the clipped 0x8E8C7864.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 10:09:43 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364502#M39314</guid>
      <dc:creator>helge</dc:creator>
      <dc:date>2017-06-27T10:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert 64-bit number from decimal to hex</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364503#M39315</link>
      <description>&lt;P&gt;just a thought - is your windows running on 32 bit or 64 bit?&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 11:10:32 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364503#M39315</guid>
      <dc:creator>inventsekar</dc:creator>
      <dc:date>2017-06-27T11:10:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert 64-bit number from decimal to hex</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364504#M39316</link>
      <description>&lt;P&gt;I am running 64-bit Splunk on 64-bit Windows Server 2012 R2.&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 13:24:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364504#M39316</guid>
      <dc:creator>helge</dc:creator>
      <dc:date>2017-06-27T13:24:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert 64-bit number from decimal to hex</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364505#M39317</link>
      <description>&lt;P&gt;@helge, I tested on &lt;CODE&gt;Splunk Enterprise 7.0&lt;/CODE&gt; on &lt;CODE&gt;Windows 10 64 bit&lt;/CODE&gt; and can see the issue with &lt;CODE&gt;tostring(64bitInteger,"hex")&lt;/CODE&gt; converting to 32 bit Hexadecimal number. Please add a bug tag to your question and report the same to Splunk Support through your Splunk Entitlement.  &lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Workaround: Try using &lt;CODE&gt;printf()&lt;/CODE&gt; command, with argument as &lt;CODE&gt;%X&lt;/CODE&gt;, to convert to 64-bit hexadecimal.&lt;/STRONG&gt; &lt;/P&gt;

&lt;P&gt;Following is the run anywhere search:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;|  makeresults
|  eval data="140726995023972"
|  eval dataHexUsingTostring=tostring(140726995023972, "hex")
|  eval dataHexUsingPrintf=printf("%X",data)
|  table data dataHexUsingTostring dataHexUsingPrintf
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;Following is the output:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;data               dataHexUsingTostring dataHexUsingPrintf
140726995023972 0x8E8C7864            7FFD8E8C7864
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 20 Nov 2017 20:31:12 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364505#M39317</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-11-20T20:31:12Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert 64-bit number from decimal to hex</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364506#M39318</link>
      <description>&lt;P&gt;Thanks for your answer. I would love to report this to Splunk Support, however, as a lowly Splunk Technology Partner, I do not have a support entitlement.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 20:36:14 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364506#M39318</guid>
      <dc:creator>helge</dc:creator>
      <dc:date>2017-11-20T20:36:14Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert 64-bit number from decimal to hex</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364507#M39319</link>
      <description>&lt;P&gt;&lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt; ... I have added it to the list of paint points of Splunk Deployment on Windows OS maintained posted by @woodcock: &lt;A href="https://answers.splunk.com/answers/516059/what-are-the-pain-points-with-deploying-your-splun.html?page=2&amp;amp;pageSize=10&amp;amp;sort=votes#answer-592720"&gt;https://answers.splunk.com/answers/516059/what-are-the-pain-points-with-deploying-your-splun.html?page=2&amp;amp;pageSize=10&amp;amp;sort=votes#answer-592720&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;Please try out the &lt;CODE&gt;printf()&lt;/CODE&gt; command for 64 bit integer to hex conversion and confirm if it works for you on Windows.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 20:53:24 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364507#M39319</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-11-20T20:53:24Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert 64-bit number from decimal to hex</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364508#M39320</link>
      <description>&lt;P&gt;I can confirm the workaround works on Splunk 6.6.3 on Windows, too.&lt;/P&gt;</description>
      <pubDate>Mon, 20 Nov 2017 20:59:36 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364508#M39320</guid>
      <dc:creator>helge</dc:creator>
      <dc:date>2017-11-20T20:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to convert 64-bit number from decimal to hex</title>
      <link>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364509#M39321</link>
      <description>&lt;P&gt;@helge, if the workaround has helped you resolve your issue, can you Accept the Answer? &lt;/P&gt;</description>
      <pubDate>Fri, 24 Nov 2017 04:17:20 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Dashboards-Visualizations/How-to-convert-64-bit-number-from-decimal-to-hex/m-p/364509#M39321</guid>
      <dc:creator>niketn</dc:creator>
      <dc:date>2017-11-24T04:17:20Z</dc:date>
    </item>
  </channel>
</rss>

