long()

Read(481) Label: convert, long integer,

Description:

Convert a string, a number or a date to a 64-bit long integer.

Syntax:

long(stringExp)

long(numberExp)

long(dateExp)

Note:

The value of parameter stringExp must be a string that consists of a long integer which has 64 bits or less. For a value with more than 64 bits, the result of long(stringExp) is imprecise and its fractional part, if any, will be truncated.

The value of parameter numberExp must be a long integer which has 64 bits or less. For a value with more than 64 bits, the result of long(numberExp) is imprecise and its fractional part, if any, will be truncated.

Parameters:

stringExp

The string expression you want to convert as a long integer.

numberExp

A number

dateExp

Date type expression

Return value:

A 64-bit long integer

Examples:

long("1234567")

1234567

long(1234567.789)

1234567

long(date("1998-01-08"))

884188800000

long(now())

1604557563837

Related functions:

float()

int()

decimal()

number()

string()