TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

EDATE

EDATE(arg1, arg2) → { number }

Returns the serial number of the date which comes the indicated number of months before or after the start date.

Parameters:

Name Type Description
arg1 any

A serial date number that represents the start date.

arg2 any

The number of months before or after the start date.

Returns:

Type
number

Example

Copy code
builder.CreateFile("xlsx");

const oWorksheet = Api.GetActiveSheet();

var oFunction = Api.GetWorksheetFunction();
var ans = oFunction.EDATE("3/16/2018", 7); 

oWorksheet.GetRange("C1").SetValue(ans);

builder.SaveFile("xlsx", "EDATE.xlsx");
builder.CloseFile();

Resulting document