How to Insert Today's Date in a Web Page
- 1). Open up your website's editing software and open the page where you'd like the date stamp inserted. Ensure that you are viewing the editing area for the raw code and not viewing the preview mode.
- 2). Enter the following into your code within the body tag:
<script LANGUAGE="Javascript">
<!--
var stampdays = new Array( "Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday");
var stampmonths = new Array( "January","February","March","April","May","June","July","August","September","October","November","December");
var thedate = new Date();
document.write(stampdays[ thedate.getDay()] + ", " + stampmonths[ thedate.getMonth()] + " " + thedate.getDate() + ", " + thedate.getFullYear());
-->
</script> - 3). Save your document and FTP it live to the Web. You should notice today's date. Change the font size and color if you like by placing font tags after the first <script> tag.
Source...