This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes sysdate function Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "sysdate function" Watch "sysdate function" New topic
Author

sysdate function

Celinio Fernandes
Ranch Hand

Joined: Jun 28, 2003
Posts: 549

I need a little javascript function that returns the date of today in the format dd/mm/yyyy
example:
September 2, 2003 ==> 02/09/2003
For control reasons, it cannot be 2/9/2003 or 02/9/2003 or 2/09/2003 but only 02/09/2003
December 14, 2003 ==> 14/12/2003
Any idea on how to implement it ?
Thanks


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCBCD 5
Visit my blog
James Swan
Ranch Hand

Joined: Jun 26, 2001
Posts: 403
knock yourself out:

note: change on-click to onclick
[edit] ok my format was mm/dd/yyyy, but I'm sure you can change that.
[ September 03, 2003: Message edited by: James Swan ]
 
Have you tried LearnNowOnline? http://www.learnnowonline.com/
 
subject: sysdate function