The toTimeString() method converts the time portion of a Date object to a string.
The toTimeString() method converts the time portion of a Date object to a string.
Date.toTimeString()
A String, representing the time as a string
Convert the time portion of a Date object to a string:
//display the time as a string. var d = new Date(); var n = d.toTimeString(); console.log(n);/*from w w w . ja va2s .c om*/