DATEVALUE
Converts a date in the form of text to a number that represents the date in the date-time code.
Syntax
expression.DATEVALUE(arg1);
expression
- A variable that represents a ApiWorksheetFunction class.
Parameters
Name | Required/Optional | Data type | Default | Description |
---|---|---|---|---|
arg1 | Required | ApiRange | ApiName | string |
Returns
number
Example
const oWorksheet = Api.GetActiveSheet();
var oFunction = Api.GetWorksheetFunction();
var ans = oFunction.DATEVALUE("2018-3-16");
oWorksheet.GetRange("C1").SetValue(ans);