Solved

How do I display the date on my index page?

Posted on 1998-11-06
3
150 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 100 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

Guide to Performance: Optimization & Monitoring

Nowadays, monitoring is a mixture of tools, systems, and codes—making it a very complex process. And with this complexity, comes variables for failure. Get DZone’s new Guide to Performance to learn how to proactively find these variables and solve them before a disruption occurs.

Question has a verified solution.

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

Suggested Solutions

Introduction:   Welcome to my first article ever. To begin with, the reason I write this article.  I participated in a question on Experts Exchange about the start command in Windows and there were some discussion about the usage. The discussio…
This article will show, step by step, how to integrate R code into a R Sweave document
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

713 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