Hi ,
I need to convert a Float value to Hexadecimal in oracle.
The logic already exists in Java which looks like
1. Covert float value to integer using Float.floatToIntBits(flt) function.
2. Convert Integer to Hexadecimal using Integer.toHexString(int) function.
For example float value -0.92945087 converted to hexadecimal gives "bf6df07e".
public class ReadDat {
public static void main(String[] args)
{
float flt = (float) -0.92945087;
System.out.println("Decimal Value:"+Float.floatToIntBits(flt));
System.out.println("Hexadecimal Value:"+Integer.toHexString(Float.floatToIntBits(flt)));
}
}
Can you please help on how can this be achieved in oracle.
Thanks,
Imran.