Date / Time Display...

liunx

Guest
Is there any way to display the date / time / etc. without the use of JavaScript or Server-Side?<br />
<br />
Thanx.<!--content-->I don't think so, but I know a really simple souce code for this... Save this text as a .js file.<br />
<br />
<!--Start Date Script<br />
test = new Date()<br />
month =test.getMonth()<br />
month = (month * 1) + 1<br />
day = test.getDate()<br />
year = test.getYear()<br />
document.write(" ",month,"/",day,"/",year," ")<br />
//End Date Script--><br />
<br />
Then, put this where you want the clock to appear:<br />
<br />
<script src=http://www.webdeveloper.com/forum/archive/index.php/"datestmp.js"></script><br />
<br />
BUT! Make sure you change the datestmp.js to what you saved the beginning text as... For example... I saved the .js file as datestmp.js In the script where I wanted the clock to appear I have <script src=http://www.webdeveloper.com/forum/archive/index.php/"datestmp.js">. <br />
<br />
Hope this helps..<!--content-->Darn.<br />
<br />
Just wanted to see if there was a way in order to account for the 10% or so who don't / can't utilize javascript.<br />
<br />
Thanx.<!--content-->Yes, there is a way to account for them, but that way is server side. Here's PHP...<br />
<br />
<?PHP<br />
echo date("m/d/Y"); #MM/DD/YYYY<br />
?><!--content-->
 
Back
Top