- Print
- DarkLight
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Description
Returns a DateTime object with a specified number of milliseconds added to today's date. Both positive and negative values are supported to either add or subtract the specified amount of time.
Input Parameters
Name | Type | Required | Description |
---|---|---|---|
value | Number | Yes | Number of milliseconds to add or subtract |
Returns
Type: DateTime
Returns a new DateTime value with the adjusted time component.
Examples
// returns a new DateTime with 250 milliseconds added to the current time
var date = tools.addMilliseconds(250);
// returns a new DateTime with 250 milliseconds subtracted from the current time
var date = tools.addMilliseconds(-250);
Remarks
Use this helper function when you want to create offset DateTime values computed from today's date and time.