TIME

function TIME(
  arg1: number = null,
  arg2: number = null,
  arg3: number = null,
): number | string | boolean

Description

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

Parameters

arg1numberdefault: null

Is a number from 0 to 23 representing the hour.

arg2numberdefault: null

Is a number from 0 to 59 representing the minute.

arg3numberdefault: null

Is a number from 0 to 59 representing the second.

Returns

number | string | boolean

Try It

var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.TIME(23, 4, 39));

Get Help

  • If you have any questions about ONLYOFFICE Docs, try the FAQ section first.
  • You can request a feature or report a bug by posting an issue on GitHub.
  • You can also ask our developers on ONLYOFFICE forum (registration required).