Solved

How do I display the date on my index page?

Posted on 1998-11-06
3
153 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Monthly Recap

May was a big month for new releases from Linux Academy! Take a look at what our team built recently in our blog. You can access the newest releases from our blog.

Question has a verified solution.

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

Making a simple AJAX shopping cart Couple years ago I made my first shopping cart, I used iframe and JavaScript, it was very good at that time, there were no sessions or AJAX, I used cookies on clients machine. Today we have more advanced techno…
Recently I have been answering a lot of questions like this in IT forums that I frequent. The question posed is usually something along the lines of "We have software X installed and need to uninstall it for reason Y" or some other variant of the sa…
Learn the basics of while and for loops in Python.  while loops are used for testing while, or until, a condition is met: The structure of a while loop is as follows:     while <condition>:         do something         repeate: The break statement m…
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…

729 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