JavaScript Date toDateString() methodThe JavaScript date toDateString() method returns the date portion of a Date object in the form of string. SyntaxThe toDateString() method is represented by the following syntax: ReturnA string representing the date portion of a Date object. JavaScript Date toDateString() method exampleHere, we will understand toDateString() method through various examples. Example 1Let's see an example to fetch current date in the form of string. Test it NowOutput: Tue Aug 07 2018 Example 2Let's see an example to fetch date portion only from the specified Date object. Test it NowOutput: Fri Aug 15 1947 Example 3Let's see one more example to fetch date portion only from the specified Date object. Test it NowOutput: Fri Aug 15 1947 Next TopicJavaScript Date |
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India