Date.prototype.toString() returns a string representation of a Date using the local time zone. It typically includes weekday, date, local time, UTC offset and a time-zone description.
Syntax:
date.toString();
Example:
const date = new Date(2026, 8, 10, 14, 20, 30);
const text = date.toString();
console.log(text);
The returned value is a string and does not change the Date object.
const date = new Date();
const value = date.toString();
console.log(typeof value); // "string"
JavaScript often converts a Date to text automatically in string contexts. Calling toString() explicitly is clearer when the conversion itself matters.
const date = new Date();
console.log("Current date: " + date);
console.log(date.toString());
The original page correctly showed that String methods become available after conversion. Use modern methods such as slice() rather than legacy substr() for new examples.
const date = new Date();
const text = date.toString();
console.log(text.slice(4));
toDateString() returns only the local date portion; toString() includes both date and time.
const date = new Date(2026, 8, 10, 14, 20, 30);
console.log(date.toDateString());
console.log(date.toString());
toISOString() returns a standardized UTC representation ending in Z. Prefer it for data interchange when an ISO UTC timestamp is appropriate.
const date = new Date();
console.log(date.toString()); // local representation
console.log(date.toISOString()); // UTC ISO representation
For locale-aware user display, use toLocaleString() or Intl.DateTimeFormat instead of manually parsing the output of toString().
const invalid = new Date(NaN);
console.log(invalid.toString()); // "Invalid Date"
The text is designed for human-readable local representation, not as a stable database or API format. Store a timestamp or a defined interchange format instead, and format it for users at the presentation layer.
Next: toLocaleString() Date Reference
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.