DateObj is a valid Date object created using Date() constructor in which we want to set the millisecond according to universal time. Value of millisecond is from 0 to 999.
Parameter: Here parameter is milliseconds_Value is the value of millisecond which is used to set in Date() constructor.
Return Values: It returns the new i.e updated millisecond which is set by setUTCMilliseconds() function.
Below programs illustrate the setUTCMilliseconds() function:
Errors and Exceptions
42 3 1 2018
Here 42 is the new milliseconds, 3 is the current month i.e April, 1 is the current date and 2018 is the current year according to universal time.
- Google Chrome
- Internet Explorer
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to firstname.lastname@example.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.