The setMilliseconds() function of date object sets milliseconds in date object. Use it for example to sets the milliseconds in date.
Syntax
This will produce following result