Solved

adding date and time to a webpage?

Posted on 2009-04-10
8
201 Views
Last Modified: 2013-11-19
How can I do this without using javascript? just basic html?
0
Comment
Question by:TeknikDev
  • 4
  • 2
  • 2
8 Comments
 
LVL 5

Expert Comment

by:Abiel de Groot
ID: 24117481
What server language are you using? asp?

A.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24117551
You don't need a server-side script for this if you are on Apache.  A simple SSI will work too.
0
 

Author Comment

by:TeknikDev
ID: 24117553
Html ...no server
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24117570
TeknikDev,

At minimum, you need a server.  Plain old HTML previewed locally has no method to get a date or time.  Javascript is the only option at this point.

If you are running Apache, you can enable server-side includes and use that in plain HTML (no PHP or ASP needed).
0
 

Author Comment

by:TeknikDev
ID: 24117593
What's apache? How would i know what server im using? i am hosting the site at ixwebhosting.com.
0
 
LVL 70

Accepted Solution

by:
Jason C. Levine earned 500 total points
ID: 24117639
Anytime your ISP advertises PHP, MySQL with hosting, they are running Apache.  So you can use SSI.

Instructions to test (and the date command) are here:

http://www.webmasterworld.com/forum13/546.htm

Basically, put the following code in your page to test:

<!--#ECHO var="DATE_LOCAL" -->

If that doesn't return the date, you will need to add some commands in an .htaccess file per the link above.
0
 
LVL 5

Expert Comment

by:Abiel de Groot
ID: 24117661
The server is likely to be either Linux or Windows.

Try and find out which one it is.

A.
0
 
LVL 70

Expert Comment

by:Jason C. Levine
ID: 24117686
ixwebhosting.com is a shared *nix environment.  I'm familiar with them...
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Suggested Solutions

Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
Developer portfolios can be a bit of an enigma—how do you present yourself to employers without burying them in lines of code?  A modern portfolio is more than just work samples, it’s also a statement of how you work.
This tutorial walks through the best practices in adding a local business to Google Maps including how to properly search for duplicates, marker placement, and inputing business details. Login to your Google Account, then search for "Google Mapmaker…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

770 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