function GetFormattedDate() {
var todayTime = new Date();
var month = format(todayTime .getMonth() + 1);
var day = format(todayTime .getDate());
var year = format(todayTime .getFullYear());
return month + "/" + day + "/" + year;
}
Read more: http://feeds.dzone.com/~r/dzone/snippets/~3/d2nB0fBa8rs/14485