Skip to main content
Sumo Logic

hexToDec

The hexToDec operator converts a hexadecimal string of 16 or fewer characters to long using Two's Complement for negative values.

Syntax

  • hexToDec("hexadecimal string") as LongValue
  • hexToDec(hexadecimal_field) as LongValue

Examples

| hexToDec("0000000000001337") as V     Returns V with a value of 4919

... | count by _collector | decToHex(_count) as v | hexToDec(v) as h

... | count by _collector | where _count = hexToDec("7AF")