Skip to main content

hexToDec Search Operator

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

Syntax

hexToDec("<hexadecimal string>") as <field>
hexToDec(<hexadecimal_field>) as <field>

Examples

The following returns V with a value of 4919

| hexToDec("0000000000001337") as V
... | count by _collector | decToHex(_count) as v | hexToDec(v) as h
... | count by _collector | where _count = hexToDec("7AF")
Sumo Logic YouTubeSumo Logic Twitter
Legal
Privacy Statement
Terms of Use

Copyright © 2022 by Sumo Logic, Inc.