Displaying the Current Date and Current Time 
Author Message
 Displaying the Current Date and Current Time

Hello everyone,

On a web page, I want to display the current data and time and have it
continuously update.  There are two ways in which I want to display this
information.

#1.  have a 1 row, 2 column table with the date in the first box, the time
in the second box.

#2.  Just display the two next to each other.

thanks,
rich




Wed, 23 May 2001 03:00:00 GMT  
 Displaying the Current Date and Current Time
Why?
99% of the people who can run such scripts already have a clock on their
status bar.

These will give you differenet variations of the current date:

<script language="VBScript">
<!--
document.write(now())
document.write(date())
document.write(formatdatetime(date(),1))
document.write(formatdatetime(date(),2))
-->
</script>

For IE3 you can use a textbox if you really feel the need to use a ticking
clock.  With IE4, it's a little easier with DHTML.  IMHO, either one is a
waste of resources... but here are some samples:

http://www.lexitech.com/bobrich/ate7.htm
http://netbeta.sogang.ac.kr/~yhchoi/main.htm
http://165.194.17.47/project/jscript/clock/
http://www.mindspring.com/~farsyde/javascript/help/dhtmlclockhelp.html
http://ntwrks.com/~ivan/dhtml/ex_2.htm
http://www.eramp.net/~pmemo/ieclocks.html

If none of these are good enough, it's amazing what five minutes at
AltaVista can turn up!  :)

   ______
   ab/mvp

   www.desktop.on.ca
   www.swynk.com/friends/bertrand/


Quote:
>Hello everyone,

>On a web page, I want to display the current data and time and have it
>continuously update.  There are two ways in which I want to display this
>information.

>#1.  have a 1 row, 2 column table with the date in the first box, the time
>in the second box.

>#2.  Just display the two next to each other.

>thanks,
>rich





Wed, 23 May 2001 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. date range to current date at specific time syntax question

2. DATES ISSUE: Number of the current Week of the current Month

3. display current system date.

4. Adding time to current date

5. getting current date and time?

6. Current date and time

7. DISPLAYING CURRENT DATE

8. displaying current time

9. Insert current date and time

10. Retrieving current date and time

11. How do I know locale setting of Time and Date of current system

12. Current date-time of remote computer .

 

 
Powered by phpBB® Forum Software