JavaScript Date toDateString() Method

Definition and Usage

toDateString() This method converts the date part of a Date object (not the time) to a readable string.

Example

Convert today's date to a readable string:

var d = new Date();
var n = d.toDateString();

Try It Yourself

Syntax

Date.toDateString()

Parameters

No parameters.

Technical Details

Return value: String, represent date as a string.

Browser Support

Method Chrome IE Firefox Safari Opera
toDateString() Support Support Support Support Support

Related Pages

Tutorial:JavaScript Date

Tutorial:JavaScript Date Format

Tutorial:JavaScript String