File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "sysdate function" Watch "sysdate function" New topic

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
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 ?

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 ]
I agree. Here's the link:
subject: sysdate function
jQuery in Action, 3rd edition