JavaScript toDateString()

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