cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Check out the JMP® Marketplace featured Capability Explorer add-in
Choose Language Hide Translation Bar
miguello
Level VI

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 (Alumni) ms
Super User (Alumni)

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))

View solution in original post

3 REPLIES 3
ms
Super User (Alumni) ms
Super User (Alumni)

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
Level VI

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 (Alumni) ms
Super User (Alumni)

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.