TIME
Converts hours, minutes and seconds given as numbers to a serial number, formatted with the time format.
Syntax
expression.TIME(arg1, arg2, arg3);
expression
- A variable that represents a ApiWorksheetFunction class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
arg1 | Required | ApiRange | ApiName | number | A number from 0 to 23 representing the hour. | |
arg2 | Required | ApiRange | ApiName | number | A number from 0 to 59 representing the minute. | |
arg3 | Required | ApiRange | ApiName | number | A number from 0 to 59 representing the second. |
Returns
number
Example
- Code
- Result
let worksheet = Api.GetActiveSheet();
let func = Api.GetWorksheetFunction();
worksheet.GetRange("A1").SetValue(func.TIME(23, 4, 39));