JavaScript toDateString() method

The JavaScript date toDateString() method is used to get the date portion of a Date object.

Syntax:

dateObj.toDateString();

Return:
String representation of 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>

Output:

Wed Nov 16 1994
Please Share