wood burning stoves 2.0
The moose likes Beginning Java and the fly likes Date question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

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

Date question

Allan Peak

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

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://aspose.com/file-tools
subject: Date question