TRY NEW VERSION

TIME

TIME(arg1, arg2, arg3) → { number | string | boolean }

Converts hours, minutes and seconds given as numbers to a serial number, formatted with a time format.

Parameters:

Name Type Description
arg1 number

Is a number from 0 to 23 representing the hour.

arg2 number

Is a number from 0 to 59 representing the minute.

arg3 number

Is a number from 0 to 59 representing the second.

Returns:

Type
number | string | boolean

Example

Copy code
builder.CreateFile("xlsx");
var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.TIME(23, 4, 39));
builder.SaveFile("xlsx", "TIME.xlsx");
builder.CloseFile();

Resulting document