long()

Read(2355) 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.

Parameter:

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

Example:

long("1234567")

1234567

long(1234567.789)

1234567

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

884188800000

long(now())

1604557563837

Related function:

float()

int()

decimal()

number()

string()