SyntaxFix
Write A Post
Hire A Developer
Questions
This should work...
var displayDate = new Date().toLocaleDateString(); alert(displayDate);
But I suspect you are trying it on something else, for example:
var displayDate = Date.now.toLocaleDateString(); // No! alert(displayDate);