Date.parse()
Date.parse() is a JavaScript method in the Date category. Parses a date string and returns the timestamp. The syntax is Date.parse(dateString). A typical example: Date.parse("2024-01-01") // 1704067200000. A close sibling is Date.now(), which returns the current timestamp in milliseconds. A close sibling is Date.UTC(), which returns the timestamp from UTC parameters. A close sibling is Date.prototype.getFullYear(), which returns the year (4 digits). A close sibling is Date.prototype.getMonth(), which returns the month (0-11, where 0 is January). More about this category: Date methods for working with dates and times. Related Date methods: Date.now(), Date.UTC(), Date.prototype.getFullYear(), Date.prototype.getMonth(), Date.prototype.getDate(), Date.prototype.getDay(), Date.prototype.getHours(), Date.prototype.getMinutes(). This page is part of the free JS Reference documentation covering 1027+ methods, each with syntax, parameters, return values, examples, and common pitfalls. You can try Date.parse() immediately in the JavaScript playground, look up unfamiliar terms in the glossary, or return to the JS Reference homepage.