Support Questions

Find answers, ask questions, and share your expertise

convert hexadecimal string to bigint

avatar
Explorer

Hello

I have a table with a field of type string that is a hexadecimal number, like 

04191D0A035580

04421352E14B80

040F644A385780

 

is there a way to convert this string values to bigint values like:

04191D0A035580 --> 1153512419579264

04421352E14B80 --> 1198550669151104

040F644A385780 --> 1142823323195264

 

thanks in advance for your help

best regards

dcon

 

1 ACCEPTED SOLUTION

avatar
Explorer

Hello

Looking for hive i find the funcion

conv('04191D0A035580', 16,10) that convert the string to string that can be casted to bigint,  this function also work in impala, i will use it.

thanks 

regards

dcon.

View solution in original post

1 REPLY 1

avatar
Explorer

Hello

Looking for hive i find the funcion

conv('04191D0A035580', 16,10) that convert the string to string that can be casted to bigint,  this function also work in impala, i will use it.

thanks 

regards

dcon.