How do I display a date in a format such as 4 august 1955 or 1 july 2002?

Sujatha Gopal

monName = new Array ("January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December")
now = new Date()
document.write(now.getDate() + " " + monName[now.getMonth()] +" " +now.getFullYear())

Save the above Code as date.js
and call in the HTML code
<script language="javascript" src="date.js"></script>

0 Comments  (click to add your comment)
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

About | Sitemap | Contact