Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Signed short hexadecimal

myousuff81
7 - Meteor

Hi,

 

Need help to convert Signed short hexadecimal to decimal

 

 

For example FD80 should be converted to decimal value -640.  Can you please provide Alteryx solution for this in the formula tool?

2 REPLIES 2
JoeL
Alteryx
Alteryx

Hi @myousuff81 ,

 

This should work as long as there is 1 hexadecimal per-row in the column. Can handle any size Hexidecimal!

 

 

if HexToNumber([HexField]) > HexToNumber(PadRight('8', length([HexField]),'0')) then

-2*HexToNumber(PadRight('8', length([HexField]),'0')) + HexToNumber([HexField]) else

HexToNumber([HexField]) endif

//PadRight('8', length([HexField]),'0') = negative crossover point

// -(negative crossover point as integer) - (subtracting negative crossover from original Hex) + (original hex)
// = -2(neg. crossover point as int) + (original hex as int)
// Joe L

 

 

Hexidecimal Formula.png

 
myousuff81
7 - Meteor

Thanks Joel. It works perfectly.

Labels