In this Page
Table of Contents | ||||
---|---|---|---|---|
|
...
Description | Parses a string representation of a date, and returns it as YYYY-MM-DDTHH:mm:ss.SSS UTC. The results are of the date-time data type. This is similar to the JavaScript parse. | ||
---|---|---|---|
Syntax |
This method has the following extensions from the standard:
| ||
Example | Expression: Result: 2011-10-30T00:00:00.000 UTC Expression: Result: 2015-04-15T13:23:10.000 UTC Expression: Date.parse(20160923, \"yyyyMMdd\")") “yyyyMMdd”) Result: 2016-09-23T00:00:00.000 |
...
Description | This is similar to the JavaScript getTime - returns the numeric value corresponding to the time for the specified date according to universal time as the number of milliseconds since 1 January 1970 00:00:00 UTC (epoch time). | ||
---|---|---|---|
Syntax |
| ||
Example | Expression: Date.now().getTime() Result: 1487712862069 |
getUTCDate
Description | Converts the specified time to its corresponding UTC time. | ||
---|---|---|---|
Syntax |
| ||
Example | Expression: Date.parse("2019-03-04T17:32:53.077").getUTCDate() Result: 4 |
...
toLocaleDateString
Description | Format the date using the given format as described in an object. | ||
---|---|---|---|
Syntax |
| ||
Example | Expression: 'JS_SomeFile' + Date.now().toLocaleDateTimeString({"format":"yyyyMMddhhmmss"}) + '.json' Result: JS_SomeFile20171106112401.json |
...
Description | Returns a copy of this datetime with the specified duration added. This is similar to the JavaScript plus. | ||
---|---|---|---|
Syntax |
| ||
Example | If Expression: Date.now().plus(2) Result: 2017-11-06T21:48:11.954 UTC (last digit increased by 2) Expression: Date.now().plus(20) Result: 2017-11-06T21:48:11.972 UTC (second to last digit increased by 2) Expression: Date.now().plus(2000) Result: 2017-11-06T21:48:13.952 UTC (fourth digit from the end increased by 2) |
plusDays
Description | Returns a copy of this datetime plus the specified number of days. This is similar to the JavaScript plusDays. | ||
---|---|---|---|
Syntax |
| ||
Example | If Expression: Date.now().plusDays(2) Result: 2017-11-08T21:48:11.952 UTC (day value increased by 2) |
plusHours
Description | Returns a copy of this datetime plus the specified number of hours. This is similar to the JavaScript plusHours. | ||
---|---|---|---|
Syntax |
| ||
Example | If Expression: Date.now().plusHours(2) Result: 2017-11-06T23:48:11.952 UTC (hour increased by 2) |
...