跳到主要内容

NOW

Returns the current date and time in the <em>MM/dd/yy hh:mm</em> format.

Syntax

expression.NOW();

expression - A variable that represents a ApiWorksheetFunction class.

Parameters

This method doesn't have any parameters.

Returns

number

Example

const worksheet = Api.GetActiveSheet();

let func = Api.GetWorksheetFunction();
let ans = func.NOW();

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