- MomentJS Tutorial
- MomentJS - Home
- MomentJS - Overview
- MomentJS - Environment Setup
- MomentJS - Introduction
- MomentJS - Parsing Date And Time
- MomentJS - Date Validation
- MomentJS - Getter/Setter
- Manipulate Date And Time
- Formatting Date And Time
- MomentJS - Date Queries
- MomentJS - Internationalization
- MomentJS - Customization
- MomentJS - Durations
- MomentJS - Utilities
- MomentJS - Plugins
- MomentJS - Examples
- MomentJS Useful Resources
- MomentJS - Quick Guide
- MomentJS - Useful Resources
- MomentJS - Discussion
MomentJS - Millisecond
This method will get / set the milliseconds. To set millisecond it takes value from 0-999, if the range is beyond, then it will add to the seconds.
Syntax
moment().millisecond(Number); moment().millisecond(); moment().milliseconds(Number); moment().milliseconds();
Example 1
var m = moment().millisecond();
Output
Example 2
var m = moment().millisecond(555);
Output
momentjs_getter_setter.htm
Advertisements