--- id: dectohex title: decToHex Search Operator sidebar_label: decToHex description: Use the decToHex operator to convert a long integer value of 16 or fewer digits to a hexadecimal string. slug: /help/docs/search/search-query-language/search-operators/dectohex/ canonical: https://www.sumologic.com/help/docs/search/search-query-language/search-operators/dectohex/ --- The `decToHex` operator converts a long value of 16 or fewer digits to a hexadecimal string using Two's Complement for negative values. :::note Hexadecimal string is always returned in upper-case. ::: ## Syntax `decToHex() as ` `decToHex("") as ` ## Examples The following returns `V` with a value of `1337`: ```sumo | decToHex("4919") as V ``` ```sumo ... | count by _collector | decToHex(_count) as v ``` The following returns `d` with a value of `46`: ```sumo ... | decToHex("70") as d ```