---
url: >-
  /statelake/scripting-reference/functions-and-procedures/conversion-functions/hextoint.md
---

# HexToInt

**HexToInt** converts a **String** that represents a hexadecimal value into an **Integer** data type.

This is used when you need to read into hexadecimal type fields within a database or file.

Declaration: Function HexToInt( HexNum : string) : Int64;

Example.

```pascal
procedure OnMapEvent(var Value:Variant);
begin
  Value := HexToInt(HexadecimalField.Value);
end;
```
