# setMilliseconds method

The `setMilliseconds` method allows you to change the number of milliseconds of the date object. It takes the number of milliseconds as the first parameter.

## Syntax

`date.setMilliseconds(milliseconds);`

## Example

Let's set the milliseconds for the current date:

`let date = new Date(); date.setMilliseconds(999); console.log(date);`

## See also

- the `setHours` method
  that sets the hours
- the `setMinutes` method
  that sets the minutes
- the `setSeconds` method
  that sets the seconds

← →
↑
en ru