parse


Converts the input date String to timestamp (in milliseconds).

Parameters


Combine the parameters as a JSON structure as input.

Parameter Mandatory/Optional Data Type Description
pattern Mandatory String The format of the date to be returned.
inString Mandatory String The date/time to convert.

Return Values

Value Data Type Description
value num The timestamp in milliseconds.

Samples

var format = tools.DateUtil.parse({"inString":"2021-07-21 16:30:00","pattern":"yyyy-MM-dd HH:mm:ss"});
return tools.resultBuilder.build(true, JSON.stringify(format));


Output

"1626885000000"