BinaryFormat.SignedInteger64

Binary

A binary format that reads a 64-bit signed integer.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

BinaryFormat.SignedInteger64(binary as binary) as any

Parameters

NameTypeRequiredDescription
binarybinaryYesThe binary data to read the 64-bit signed integer from.

Return Value

functionA binary format function that reads an 8-byte signed integer from binary data.

Remarks

BinaryFormat.SignedInteger64 is a binary format specifier that reads a 64-bit (8-byte) signed integer from binary data. The value range is -9,223,372,036,854,775,808 to 9,223,372,036,854,775,807 (Int64 / long). The integer is stored in two's complement format.

The default byte order is little-endian. Use BinaryFormat.ByteOrder to wrap this format if the source data uses big-endian byte ordering.

This format is used for large integer values such as file sizes, timestamps, and counters that exceed the range of 32-bit integers.

Examples

Example 1: Read a 64-bit signed integer

let
    binaryData = #binary({
        0x01, 0x00, 0x00, 0x00,
        0x00, 0x00, 0x00, 0x00
    }),
    result = BinaryFormat.SignedInteger64(binaryData)
in
    result

Example 2: Read a large 64-bit signed integer

let
    // 1,000,000 in 64-bit little-endian
    binaryData = #binary({
        0x40, 0x42, 0x0F, 0x00,
        0x00, 0x00, 0x00, 0x00
    }),
    result = BinaryFormat.SignedInteger64(binaryData)
in
    result

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks