Document toolboxDocument toolbox

To base16, b16, hex (to16)

Description

Returns a hexadecimal (base16) string from the given byte array. This is the inverse of the From base16, b16, hex (to16) operation. For more information about byte arrays, see the Make byte array (mkboxar) operation.

How does it work in the search window?

This operation needs only one argument:

Argument

Data type

Argument

Data type

Boxar mandatory

boxar(int1)

The data type of the new column is string.

Example

Let's transform the bytesTransferred column in the demo.ecommerce.data table into hexadecimal(base16) string format. Before that, we need to transform it into byte array format (boxar(int1)) using the Make byte array (mkboxar) operation to create a new column called byteArray. Then, click Create column and select the To base16, b16, hex operation. The arguments needed are:

  • Boxar - byteArray column

After clicking Create column, the new column will show the values transformed into strings.

How does it work in LINQ?

Use the operator select... as...  and add the operation syntax to create the new column. This is the syntax of the To base16, b16, hex operation:

  • to16(boxar(int1))

Example

Copy the following LINQ script and try the previous example on the demo.ecommerce.data table.

from demo.ecommerce.data select mkboxar(bytesTransferred) as byteArray, to16(byteArray) as base16string