free flash templates forum

free flash templates forum (http://forum.freenicetemplates.com/index.php)
-   Free flash templates (http://forum.freenicetemplates.com/forumdisplay.php?f=2)
-   -   [SOLVED] Inserting Date into the web page (http://forum.freenicetemplates.com/showthread.php?t=19)

kamalmisc 03-31-2009 03:26 AM

Inserting Date into the web page
 
Hi,
Does anyone know how to insert a date into the web page instead of hard coding it each week?

http://www.steppingstonemontessori.org

kamal

freenicetemplates 03-31-2009 07:37 AM

Hi,
You can add date in your webpage javascript this way:

<script type="text/javascript">
var dat = new Date()
document.write(dat .getDate())
document.write(".")
document.write(dat .getMonth() + 1)
document.write(".")
document.write(dat.getFullYear())
</script>

kamalmisc 03-31-2009 12:16 PM

Thank you for your help.
kamal

kamalmisc 04-02-2009 12:29 AM

Quote:

Originally Posted by freenicetemplates (Post 57)
Hi,
You can add date in your webpage javascript this way:

<script type="text/javascript">
var dat = new Date()
document.write(dat .getDate())
document.write(".")
document.write(dat .getMonth() + 1)
document.write(".")
document.write(dat.getFullYear())
</script>

I wrote this code into the webpage where I want the date to appears. It returns the date in this format "1.4.2009 " I want the date to be in this format "April 1, 2009".
How can I get the month to be in alphabetical format rather than numerical format?

Kamal

freenicetemplates 04-02-2009 02:29 PM

I think you will find what you're look for here :
http://www.netmechanic.com/news/vol5...cript_no12.htm


All times are GMT. The time now is 11:40 PM.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.