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 Beginning Java and the fly likes Date problem 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 » Java » Beginning Java
Bookmark "Date problem" Watch "Date problem" New topic

Date problem

Dhiraj Srivastava
Ranch Hand

Joined: Aug 29, 2001
Posts: 49
I want to display only the current date in a text field can any one please help me
Thanks in advance
Fred Abbot
Ranch Hand

Joined: Jun 01, 2000
Posts: 300
BJ Grau
Ranch Hand

Joined: Jul 10, 2001
Posts: 234
Or try this (or something like this) for outputting a formatted date:

SimpleDateFormat sdf = new SimpleDateFormat();
String daytime = sdf.format(new Date(System.currentTimeMillis()));
It is sorta covered in the JavaRanch Style Guide.
subject: Date problem
Similar Threads
about dataBase books
WA #1.....word association
How can I get sysdate in java?
Head First Design Patterns Release Date
Another format check :P