D
dickerson.sd
SimpleDateFormat parse fails on BIDI system using the correct format...
SimpleDateFormat df = new SimpleDateFormat( "yyyy-MM-dd");
System.out.println("Current Date: "+df.format(new Date()));
try {
System.out.println("now parsing current date");
df.parse("2006-08-30");
} catch (Exception e) {
e.printStackTrace();
}
The output for Current Date shows "2006-08-30", but the parse, parsing
the same date fails with an Unparseable date exception:
Here's the output from this program.
Current Date: 2006-08-30
now parsing current date
java.text.ParseException: Unparseable date: "2006-08-30"
at java.text.DateFormat.parse(DateFormat.java:347)
at DateFormatTester.main(DateFormatTester.java:24)
SimpleDateFormat df = new SimpleDateFormat( "yyyy-MM-dd");
System.out.println("Current Date: "+df.format(new Date()));
try {
System.out.println("now parsing current date");
df.parse("2006-08-30");
} catch (Exception e) {
e.printStackTrace();
}
The output for Current Date shows "2006-08-30", but the parse, parsing
the same date fails with an Unparseable date exception:
Here's the output from this program.
Current Date: 2006-08-30
now parsing current date
java.text.ParseException: Unparseable date: "2006-08-30"
at java.text.DateFormat.parse(DateFormat.java:347)
at DateFormatTester.main(DateFormatTester.java:24)