Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with SimepleDateFormat for the military pattern....

807605Oct 3 2007 — edited Oct 3 2007
i have the code, which has to display date in the military format i.e., "yyyyMMddhhmm".
java.util.Date date = new SimpleDateFormat("yyyyMMddhhmm").parse("200709201700");
System.out.println("Expected Date : " + date);

but output displays everytime i.e., Thu Sep 20 17:00:00 IST 2007

is there any problem with the pattern???
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 31 2007
Added on Oct 3 2007
7 comments
243 views