JavaScript Date toTimeString() Method
- Previous Page toString()
- Next Page toUTCString()
- Go to the Previous Level JavaScript Date Reference Manual
Definition and usage
toTimeString()
This method converts the time part of the Date object to a string.
Example
Convert the time part of the Date object to a string:
var d = new Date(); var n = d.toTimeString();
Syntax
Date.toTimeString()
Parameters
No parameters.
Technical details
Return value: | A string representing the time in string format. |
---|
Browser support
Method | Chrome | IE | Firefox | Safari | Opera |
---|---|---|---|---|---|
toTimeString() | Support | Support | Support | Support | Support |
- Previous Page toString()
- Next Page toUTCString()
- Go to the Previous Level JavaScript Date Reference Manual