File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes SimpleDateFormat Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "SimpleDateFormat" Watch "SimpleDateFormat" New topic
Author

SimpleDateFormat

Maureen Charlton
Ranch Hand

Joined: Oct 04, 2004
Posts: 218
Is it feasible to set the SimpleDateFormat to just month and year i.e.

SimpleDateFormat sdf = new SimpleDateFormat ("MM-yy");
Steve Morrow
Ranch Hand

Joined: May 22, 2003
Posts: 657

Yes.
Maureen Charlton
Ranch Hand

Joined: Oct 04, 2004
Posts: 218
Steve,

Thanks for responding. Much appreciated.
Maureen Charlton
Ranch Hand

Joined: Oct 04, 2004
Posts: 218
Should anyone find it helpful when following this thread my code in the end was as follows:

 
It is sorta covered in the JavaRanch Style Guide.
 
subject: SimpleDateFormat