Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2008

Tip: Looking for answers? Try searching our database.

SimpleDateFormat can parse MMddyy wrong without error???

Thread view: 
caultonpos@gmail.com - 16 Feb 2008 01:11 GMT
Java 1.6 I execute the following code:

SimpleDateFormat sdf = new SimpleDateFormat("MMddyy");
Date d = sdf.parse("013355");

and it returns the date

Wed Feb 02 00:00:00 EST 1955

no parse exception?

What am I missing?

Greg
Daniele Futtorovic - 16 Feb 2008 01:41 GMT
> Java 1.6 I execute the following code:
>
[quoted text clipped - 8 lines]
>
> What am I missing?

<http://java.sun.com/javase/6/docs/api/java/text/DateFormat.html#setLenient(boolean)>
<http://java.sun.com/javase/6/docs/api/java/util/Calendar.html#setLenient(boolean)>


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.