Dim bc As ByteConverter
bc.LittleEndian = True
Log(bc.HexFromBytes(bc.LongsToBytes(Array As Long(1287821))))
Output: 8DA6130000000000
If you want to remove the trailing zeroes:
B4X:
Dim s As String = bc.HexFromBytes(bc.LongsToBytes(Array As Long(1287821)))
Do While s.Length > 2 And s.SubString(s.Length - 2) = "00"
s = s.SubString2(0, s.Length - 2)
Loop
Log(s)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.