BookmarkSubscribeSubscribe to RSS Feed
miguello

Community Trekker

Joined:

Jan 27, 2016

Hexadecimal to decimal

I have a column that has number in the format of 0x1, 0x5, 0xe - how do I convert these hexadecimal to decimal?

Thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
ms

Super User

Joined:

Jun 23, 2011

Solution

Re: Hexadecimal to decimal

Just change the column data type to numeric (works in JMP 12, maybe earlier versions too).

If you want to keep the hex column as strings for reference you could create a numerical column with the simple formula Num(:hexcol).

If it does not work try this formula (change "hexcol" to the name of you column):

Hex To Number(Substr(:hexcol, 3))

3 REPLIES
ms

Super User

Joined:

Jun 23, 2011

Solution

Re: Hexadecimal to decimal

Just change the column data type to numeric (works in JMP 12, maybe earlier versions too).

If you want to keep the hex column as strings for reference you could create a numerical column with the simple formula Num(:hexcol).

If it does not work try this formula (change "hexcol" to the name of you column):

Hex To Number(Substr(:hexcol, 3))

miguello

Community Trekker

Joined:

Jan 27, 2016

Re: Hexadecimal to decimal

The first two do not work.

The last formula works.

That was the first thing I tried to do , but it did not like tha input arguments.

I tried using Munger, but looks like Substr is the right way to go.

Thanks a lot!

ms

Super User

Joined:

Jun 23, 2011

Re: Hexadecimal to decimal

In JMP 12.2 for Mac I can just type for example 0x1e4 in a numeric column and it will automatically transform into a decimal number.

I just tried doing the same in JMP 12.01 for Windows but it did not work, which may explain why my first two suggestions did not work for you.

Probably a unix only thing.