...

View Full Version : server time on my page



mmkoss
06-17-2002, 04:47 PM
I need to display time that is currently on my web server on a webpage. All the scripts I have seen display only time on the clients machine. Could you please help

joh6nn
06-17-2002, 04:50 PM
...

this is the client side forum. if you want to do something involving the server, you need to ask in the server side forum.

JohnKrutsch
06-17-2002, 05:08 PM
Moving to the server-side forum

Jeewhizz
06-17-2002, 09:05 PM
Got PHP? This will work :)



<?
echo date("l j F Y");
?>


Jee

mmkoss
06-18-2002, 03:28 PM
Dave,
I am a begginer in this so I from what I understand server-side language is VB. Its a site running Front Page Server Extentions and ASP pages. Hope this can help. Thanks in advance:D

JoeP
06-18-2002, 11:03 PM
This Code In ASP:


<html>
<body>
<%
dim todaysDate
todaysDate=now()
%>
<%
Response.write todaysDate
Response.write("<br>")
%>

<%
Response.write FormatDateTime(todaysDate,0)
Response.write("<br>")
%>

<%
Response.write FormatDateTime(todaysDate,1)
Response.write("<br>")
%>

<%
Response.write FormatDateTime(todaysDate,2)
Response.write("<br>")
%>

<%
Response.write FormatDateTime(todaysDate,3)
Response.write("<br>")
%>

<%
Response.write FormatDateTime(todaysDate,4)
%>
</body>
</html>



Will Produce The Server Time In This Format:

6/18/2002 3:59:24 PM
6/18/2002 3:59:24 PM
Tuesday, June 18, 2002
6/18/2002
3:59:24 PM
15:59

mmkoss
06-20-2002, 04:34 PM
Thanks a lot that helped a lot. Now comes the tricky part. How do I update the time every second. I need people to see the time changing. Thanks 1000 times!:D

JoeP
06-20-2002, 07:07 PM
It can be done by calcukating GMT difference from your server time zone.

Visit this page:

http://tech.irt.org/articles/js076/index.htm

Several tips to do what you are looking for.

nucleuz
06-21-2002, 10:56 AM
http://www.google.com/search?hl=en&ie=ISO-8859-1&q=javascript+clock
Should give you some good tutorials on using javascript to manipulate time.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum