---
url: /flow/guide/scripting-reference/functions/conversion/inttohex.md
---

# IntToHex

## Declaration

`Function IntToHex( v : int64; d : Integer) : string`

### Example

```pascal
procedure OnMapEvent(var Value:Variant);
var MyAmount : Integer
begin
MyAmount := 123;
Value := IntToHex(MyAmount,0);
end;
```

## Description

IntToHex converts a Integer into a hexadecimal value represented as a String.

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