Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 4 of 4
  1. #1
    Member VegaLA's Avatar
    Join Date
    May 2004
    Posts
    70
    Member #
    6035
    Hi everyone,
    I am trying to display the current time on the site and having looked around I found this code

    Response.Write FormatDateTime("12/23/2003 8:24 AM",vbShortTime)

    but of course it just displays the 8.24 constantly.. no surprise there then.
    Does anyone know what i need to add to this in order for it to display the current time ?

    Thanks in advance,
    Mitch.....

  2.  

  3. #2
    Senior Member audiofreak9's Avatar
    Join Date
    Apr 2005
    Location
    NJ
    Posts
    339
    Member #
    9584
    I have used the following in the past, it doesn't give you the date in number format but it works.

    Output looks like this, Current Time: Thu Apr 14 17:12:37 EDT 2005

    I'm sure there is a way to clean the output up, but it's a start

    Code:
    <script>
    var time=new Date()
    document.write('Current Time: '+time+'')
    </script>

  4. #3
    Senior Member
    Join Date
    May 2003
    Location
    UK
    Posts
    2,354
    Member #
    1326
    This displays the server time. If you want the clients time, use audiofreak9 's code.

    Code:
    <%
    Dim clock
    clock = Time
    Response.Write(clock)
    %>

  5. #4
    Member VegaLA's Avatar
    Join Date
    May 2004
    Posts
    70
    Member #
    6035
    Thats perfect, thanks bfsog.

    Mitch.......


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 01:13 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com