TRY NEW VERSION

Try now New API BETA

Try out the new view and capabilities of the API documentation

START

DAY

DAY(arg1) → { number }

Returns the day of the date given in the numerical format, a number from 1 to 31.

Parameters:

Name Type Description
arg1 number

A number in the date-time code.

Returns:

Type
number

Example

Copy code
builder.CreateFile("xlsx");

const oWorksheet = Api.GetActiveSheet();

var oFunction = Api.GetWorksheetFunction();
var ans = oFunction.DAY("2018/3/16"); 

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

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

Resulting document