Date Only

K

Kender

When I insert the following on my page I get the date and time. How can I
modify it to get the date only:

<SCRIPT LANGUAGE="JavaScript">
var Today=new Date ();
document.write("<b>" + "Today is " + Today + "<br>");
</script>

Also is there anyway to change the font for this fragment?
Thanks,
Erin
 
D

David Bartosik - MS MVP

There is an extra charge for off topic coding help ;-)

<script>
var Today=new Date ();
var M=Today.getMonth() + 1;
var D=Today.getDate();
var Y=Today.getFullYear();
document.write("<font face=arial size=2>" + "<b>" + "Today is " + M + "/" +
D + "/" + Y +
"</b>" + "</font>");
</script>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top