• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 189
  • Last Modified:

How do I display the date on my index page?

I am using NT4 with IIS3. I have ASP and Perl 5.003 loaded. Is there any way I can get the date from some sort of environment variable and display it on my index page.

I know how to get it from a perl script, but the script needs some sort of action to run. It won't display anything unless it is executed by some trigger, so it won't work on my index page.

I simply want to say "Todays date is...whatever" on my home page.

1 Solution
easy way to do this, as the server is iis, would be with a little server side VBScritpt:

---- Cut here ----
todaysdate = Date

Todays Date is <%=todaysdate%>.
--- Cut here ---

You can change the date format with the formatdatetime() Function to suit as well.

Hope that helps.

The only thing is that is needs an ASP to be your index page. It is possible to do that, but you need your webroot to be "executable" (and all your subdirectories will automatically be executable too).

The easiest thing is probably client-side javascript, it will display the date of the client, not of the server:

Now = new Date();


You could also try to use SSI (Server Side Include) but I am afraid that IIS3 does not support the SSI exec command. Anyway, to use SSI you'll have to rename your index file too.

johnsmAuthor Commented:
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now