This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Date question Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Date question" Watch "Date question" New topic
Author

Date question

Allan Peak
Greenhorn

Joined: Jul 10, 2002
Posts: 7
How can I set a Date field to a specific date/time?
rom chatterjee
Ranch Hand

Joined: Dec 11, 2001
Posts: 46
If you mean a java.util.Date object, then you should really be using a java.util.Calendar object. This has set and get methods that take constants representing months, hours, etc


Rom Chatterjee<BR>Sun Certified Java Programmer
Dirk Schreckmann
Sheriff

Joined: Dec 10, 2001
Posts: 7023
For more information on using any of the J2SE classes, The API Specification is a good place to begin to understand what a class or instances of a class do and how to use them. Of course, asking questions and searching past conversations at JavaRanch ain't bad either.


[How To Ask Good Questions] [JavaRanch FAQ Wiki] [JavaRanch Radio]
John Lee
Ranch Hand

Joined: Aug 05, 2001
Posts: 2545
Thanks Dirk!
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Date question
 
Similar Threads
Head First Design Patterns Release Date
WA #1.....word association
about dataBase books
How can I get sysdate in java?
Another format check :P