This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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: 547

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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: sysdate function
 
Similar Threads
http://localhost:8080 shows page not diaplyed in browser.
problem in getting date and time in textbox
Help wanted on control select/option by javascript
Now solve this
Xerces Parser, issue with "/" in data body during XMLEntityScanner.load