SyntaxFix
Write A Post
Hire A Developer
Questions
Since the question is tagged as JQuery:
JQuery
If you are also using JQuery UI you can use $.datepicker.formatDate():
JQuery UI
$.datepicker.formatDate()
$.datepicker.formatDate('yy/mm/dd', new Date());
See this demo.