SimpleDateFormat error with BIDI

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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top