DATE

function DATE(arg1: number = null, arg2: number = null, arg3: number = null): number

Description

Returns a number that represents the date in the date-time code.

Parameters

arg1numberdefault: null

A number from 1900 or 1904 (depending on the workbook's date system) to 9999.

arg2numberdefault: null

A number from 1 to 12 representing the month of the year.

arg3numberdefault: null

A number from 1 to 31 representing the day of the month.

Returns

number

Try It

var oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
oWorksheet.GetRange("A1").SetValue(oFunction.DATE(2018, 3, 16));

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).