toDateString (JavaScript)

Gets a string representing the local date.

Defined in

Date (Standard - JavaScript)

Syntax

toDateString() : string
Return value Description
string The string representation of the date.

Examples

(1) This computed label displays the current date.
var date = new Date();
date.toDateString()
// 26-Nov-2006

(2) This computed label displays the base date (where the time zone is -5).

var date = new Date(0);
date.toDateString()
// 01-Jan-1970