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
- arg1
number
null A number from 1900 or 1904 (depending on the workbook's date system) to 9999.
- arg2
number
null A number from 1 to 12 representing the month of the year.
- arg3
number
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));