JavaScript toTimeString() method
The JavaScript date toTimeString() method is used to get the time portion of a Date object. Syntax: dateObj.toTimeString(); Return: String representation of the time portion of a Date object. Example: <!DOCTYPE html> <html> <body> <script> var bday=new Date(“November 16, 1994 21:10:10”); document.writeln(bday.toTimeString()); </script> </body> </html>