Solved

How do I display the date on my index page?

Posted on 1998-11-06
3
144 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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks,
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

In this tutorial I will show you how to make a simple HTML bar chart with the usage of WhizBase, If you want more information about WhizBase please read my previous articles at http://www.experts-exchange.com/ARTH_5123186.html (http://www.experts-ex…
It is a general practice to get rid of old user profiles on a computer  in a LAN environment. As I have been working with a company in a LAN environment where users move from one place to some other place at times. This will make many user profil…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now