- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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!
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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))
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Get Direct Link
- Report Inappropriate Content
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.