Pagina di Descrizione

Utility

utility

The object contains all the system utilities.

convap

Description

The function modifies the quotation marks present in the string by doubling them. This way, the string can be used within an SQL call.

Type Value

string

Format

string = utility.convap(value)

Typology

Metodo

Systems

Windows, Web, Android, IOS, Mac OS

Parametro

Tipo Valore

Description

value

string

The value to be checked

Examples

datatable = database.getsql(`SELECT * FROM customers where name=` .. utility.convap(`D`Amico`) .. ```)

createdate

Description

Create a date in timestamp format.

Type Value

double

Format

double = utility.createdate(year, month, day, hour, minute, second)

Typology

Metodo

Systems

Windows, Web, Android, IOS, Mac OS

Parametro

Tipo Valore

Description

day

integer

The day of the date to be converted.

hours

integer

The time to be converted.

minutes

integer

The minutes of the date to be converted.

months

integer

The month of the date to be converted.

seconds

integer

The seconds of the date to be converted.

years

integer

The year of the date to be converted.

Examples

date = utility.createdate(2024,03,16,2,30,0)

crlf

Description

Returns the carrier return character.

Type Value

string

Format

string = utility.crlf()

Typology

Metodo

Systems

Windows, Web, Android, IOS, Mac OS

Examples

carrier = utility.crlf()

dateadddays

Description

Increase the days of a date.

Type Value

double

Format

double = utility.dateadddays(timestamp, number)

Typology

Metodo

Systems

Windows, Web, Android, IOS, Mac OS

Parametro

Tipo Valore

Description

number

double

The number of days to add or subtract.

timestamp

double

The date to be modified in timestamp format.

Examples

newdate = utility.dateadddays(date,1)

dateaddhours

Description

Increase the hours of a given date

Type Value

double

Format

double = utility.dateaddhours(timestamp, number)

Typology

Metodo

Systems

Windows, Web, Android, IOS, Mac OS

Parametro

Tipo Valore

Description

number

double

The number of hours to add or subtract.

timestamp

double

The date to be modified in timestamp format.

Examples

newdate = utility.dateaddhours(date,1)

dateaddminutes

Description

Increase the minutes of a given date.

Type Value

double

Format

double = utility.dateaddminutes(timestamp, number)

Typology

Metodo

Systems

Windows, Web, Android, IOS, Mac OS

Parametro

Tipo Valore

Description

number

double

The number of minutes to add or subtract is

timestamp

double

The date to be modified in timestamp format.

Examples

newdate = utility.dateaddminutes(date,1)

dateaddmonths

Description

Increase the months of a date

Type Value

double

Format

double = utility.dateaddmonths(timestamp, number)

Typology

Metodo

Systems

Windows, Web, Android, IOS, Mac OS

Parametro

Tipo Valore

Description

number

double

The number of months to add or subtract.

timestamp

double

The date to be modified in timestamp format.

Examples

newdate = utility.dateaddmonths(date,1)

dateaddseconds

Description

Increase the seconds of a date

Type Value

double

Format

double = utility.dateaddseconds(timestamp, number)

Typology

Metodo

Systems

Windows, Web, Android, IOS, Mac OS

Parametro

Tipo Valore

Description

number

double

The number of seconds to add or subtract.

timestamp

double

The date to be modified in timestamp format.

Examples

newdate = utility.dateaddseconds(date,1)

dateaddyears

Description

Increase the years of a date.

Type Value

double

Format

double = utility.dateaddyears(timestamp, number)

Typology

Metodo

Systems

Windows, Web, Android, IOS, Mac OS

Parametro

Tipo Valore

Description

number

double

The number of years to add or subtract.

timestamp

double

The date to be modified in timestamp format.

Examples

newdate = utility.dateaddyears(date,1)

dateday

Description

Extract the numerical value of the day from a date.