dcsimg
www.webdeveloper.com
Results 1 to 5 of 5

Thread: World Time Clock

  1. #1
    Join Date
    Jan 2003
    Location
    London
    Posts
    13

    World Time Clock

    Hi All

    Can anyone help me with some editable code that will display the server time?

    thanks if you can

    Bruno

  2. #2
    Join Date
    Jan 2003
    Location
    USA
    Posts
    688
    And let's say the server is two hours ahead of the company's time zone:

    OrgCurDtTime = DateAdd("H", -2, Now())

  3. #3
    Join Date
    Jan 2003
    Location
    London
    Posts
    13
    Hi Guys

    Sorry I have taken so long but this is great.

    Thanks loads

    Bruno

  4. #4
    Join Date
    Jan 2003
    Location
    London
    Posts
    13
    Hi Bullschmidt

    I have tested the code and played with it to try and get it to do what I want it to...but I cant!

    Need a bit more help please,

    I want the hour:minute:seconds to be displayed only - no date - but be able to add/deduct hours and minutes.

    I have Checked out the Chili Asp tutorials and tried using some functions from it but just basically haven't got a clue.

    Would appreciate the assistance very much.

    Thanks

    Bruno

  5. #5
    Join Date
    Jan 2003
    Location
    London
    Posts
    13
    Hi All

    After much F$%king around I have finally done what I set out to do and even though this is probably very simple it is the First of my ASP I have ever done;

    <%
    Dim localHour
    localHour = Hour(Time())
    localHour = localHour-1
    Dim dtmHour
    dtmHour = localHour
    If dtmHour < 12 Then
    strAMPM = "AM"
    Else
    strAMPM = "PM"
    End If
    Response.Write "Local Time: " & dtmHour & ":" & Minute(Time()) & ":" & Second(Time()) & " " & strAMPM
    %>

    Purpose;
    This script will take the server time, Allow you to add/subtract time from the hour (localHour) and will check whether its AM or PM and then write it to the page..

    Final Comment;
    You may think...even know, this is simple but I dont care, it was my first script (admittedly I did have some help) AND I am Honoured...neigh Proud to share it with anyone else.

    Thanks chaps for your assistance

    Bruno

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles