williey
Technical User
- Jan 21, 2004
- 242
I have a column containing signed integers that need to be converted to Hex and reverse the hex show the IP address..
I have tried using the RAWTOHEX function but I do not get the expected result.
Here are the steps for the conversion to take place..
1. Convert the database display (-1139627840) to hex value. 0xBC12A8C0.
2. Reverse the hex bytes, as shown below.: C0 A8 12 BC
3. Convert the bytes from hex to decimal as shown: 192 168 18 188
4. The IP address displays in the following format: 192.168.18.188
I have tried using the RAWTOHEX function but I do not get the expected result.
Here are the steps for the conversion to take place..
1. Convert the database display (-1139627840) to hex value. 0xBC12A8C0.
2. Reverse the hex bytes, as shown below.: C0 A8 12 BC
3. Convert the bytes from hex to decimal as shown: 192 168 18 188
4. The IP address displays in the following format: 192.168.18.188