How To

How to Add Date & Time to ASP pages

Member
By SB Glasby
User-Submitted Article
(5 Ratings)

many web sites want to display the visitors current date and time. JavaScript has been the answer for many designers, but more and more people are becoming security conscious with their browsers and turning off JavaScript.

Difficulty: Easy
Instructions

Things You'll Need:

  • Web pages on a Windows Server running IIS (that support ASP)
  • Design software (note pad or similar text editor will work just fine )
  1. Step 1

    Open web page you want to show date & time on.

  2. Step 2

    Select the location you want to display the date & time

  3. Step 3

    Type: <%=now()%> for date & time
    Type: <%=date() %> for just the date to show.
    Type: <%=time()%> for just the time to show.

  4. Step 4

    Save file with the extension ".asp"

  5. Step 5

    upload file to server.

Tips & Warnings
  • There are many extra functions and formatting options to show date and time in different formats.
  • This will show date & time on any page hosted on a windows web server configured to run ASP.
  • Will not run on unix/linux type servers unless running chilikat ASP ( most do not )

Post a Comment

Post a Comment
  • Have you done this? Click here to let us know.
I Did This

Related Ads

Tags
Internet
Virginia DeBolt,

Meet Virginia DeBolt eHow's Internet Expert.

Get Free Internet Newsletters

Copyright © 1999-2009 eHow, Inc. Use of this web site constitutes acceptance of the eHow Terms of Use and Privacy Policy.   en-US

Demand Media
eHow_eHow Technology and Electronics