How to use the Date.toDateString() method In Javascript
The date.toDateString() method converts the given date object’s contents of the date portion into a string.
Example: In this example, we will convert the date portion of the object to a date string using the Date.toDateString() method.
// New date using date Constructor
let d = new Date()
// Convert to string
let dateString = d.toDateString();
// Print output
console.log(dateString)
Output
Wed Sep 20 2023
JavaScript Program to Convert Date to String
In this article, we will see how to convert a JavaScript Date to a string using JavaScript. We have a few methods to convert JavaScript Date to string which are described below.