current time and date

N

nevesone

Does anyone know how I can add the current time and date to my website. So
when someone views the homepafe the current date and time shows??
 
T

Thomas A. Rowe

Who's current date and time, your local time or the users?

--
==============================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)

FrontPage Resources, WebCircle, MS KB Quick Links, etc.
==============================================
 
T

Trevor L.

Hi ,

Here is an earlier potting on this topic

----- Original Message -----
From: "Larry" <[email protected]>
Newsgroups: microsoft.public.frontpage.client
Sent: Saturday, January 29, 2005 1:48 PM
Subject: Re: how to time clock onto a web page showing the time in your own
area.

Here's one that works fine for me. It display the local time on your
computer:

Put the script below in the HEAD section of your page or in a common js
file.

<!-- Output Header Time display -->
<script>

function padout(number) { return (number < 8) ? '0' + number : number; }

function updateClocks() {
now = new Date();
document.forms[0].timenow.value = padout(now.getHours()) + ':' +
padout(now.getMinutes()) + ':' + padout(now.getSeconds());
now.setTime(now.getTime() - (1000*60*60*12));
setTimeout('updateClocks()',500);
}
</script>
----------
Put the code below where you want the clock to display. Add text as
desired.

<form name="time">
<font face="Arial, Helvetica,
sans-serif"><b><input
name="timenow" type="text" size="6">
<script language="JavaScript" type="text/javascript">
updateClocks()

</script>&nbsp;
</b></font>
</form>

Larry


I choose Polesoft Lockspam to fight spam, and you?
http://www.polesoft.com/refer.html
 
Top