Set Full Year : Date Set « Date Time « JavaScript DHTML






Set Full Year

    
<html>
<body>
<button onclick="var myDate = new Date(); 
                 myDate.setFullYear(2000); 
                 alert(myDate);">
                 Date: set Full Year
                 </button>
</body>
</html>

    
      
      








Related examples in the same category

1.Set Date
2.Set Hours
3.Set Milliseconds
4.Set Minutes
5.Set Month
6.Set Seconds
7.Set Time
8.Set Year