?
Solved

How do I display the date on my index page?

Posted on 1998-11-06
3
Medium Priority
?
180 Views
Last Modified: 2013-12-25
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.

Thanks.
0
Comment
Question by:johnsm
3 Comments
 

Accepted Solution

by:
Eck earned 400 total points
ID: 1829461
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.



0
 
LVL 28

Expert Comment

by:sybe
ID: 1829462
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:

<script>
Now = new Date();
document.write(Now):
</script>

===

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.




0
 
LVL 1

Author Comment

by:johnsm
ID: 1829463
Thanks,
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you get a (Blue Screen of Death), your system writes a small file called a minidump. Your first step is to make certain your computer is setup to record memory dumps. Right click My Computer, choose properties. Click on the advanced tab, an…
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Learn the basics of modules and packages in Python. Every Python file is a module, ending in the suffix: .py: Modules are a collection of functions and variables.: Packages are a collection of modules.: Module functions and variables are accessed us…
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses
Course of the Month14 days, 21 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question