Web Analytics Made Easy -
StatCounter server time on my page - CodingForum

Announcement

Collapse
No announcement yet.

server time on my page

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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

  • #2
    ...

    this is the client side forum. if you want to do something involving the server, you need to ask in the server side forum.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

    Comment


    • #3
      Moving to the server-side forum

      Comment


      • #4
        Got PHP? This will work

        PHP Code:
        <?
        echo date("l j F Y");
        ?>
        Jee
        Jeewhizz - MySQL Moderator
        http://www.sitehq.co.uk
        PHP and MySQL Hosting

        Comment


        • #5
          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

          Comment


          • #6
            This Code In ASP:
            Code:
            <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
            House Of Proctor Genealogy

            Comment


            • #7
              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!

              Comment


              • #8
                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.
                House Of Proctor Genealogy

                Comment


                • #9
                  http://www.google.com/search?hl=en&i...vascript+clock
                  Should give you some good tutorials on using javascript to manipulate time.

                  Comment

                  Working...
                  X