A simple javascript code to return todays date
<script language = "javascript" type="text/javascript">
function today() {
var todaysDate = new Date();
var month = todaysDate.getMonth() < 9 ? ("0" + (parseInt(todaysDate.getMonth()) + 1)) : parseInt(todaysDate.getMonth()) +
1;
var day = todaysDate.getDate() < 10 ? "0" + todaysDate.getDate() : todaysDate.getDate();
return month + "/" + day + "/" + todaysDate.getYear();
}
alert(Date()); //Actual
alert(today()); //Formatted
</script>