Helpful Information
 
 
Category: Server side development
server time on my page

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

...

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

Moving to the server-side forum

Got PHP? This will work :)



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


Jee

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

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

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

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.

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.










privacy (GDPR)