camel-bindy is throwing an *java.text.ParseException * on failing to parse
date with format *"dd-MMM-yyyy hh"*


*The date field in the CsvRecord is:*
        @DataField(pos = 1, required = true, pattern = "dd-MMM-yyyy hh")


*Row from CSV file:*
"10-Nov-2013 00","ARTHUR","2","CON ED NY CITY",332.8,90,90,,35,,70,,0,23512


*Sample test below works fine:*
private static void testDate(){
                String dateString="10-Nov-2013 00";
                SimpleDateFormat dateFormat = new SimpleDateFormat("dd-MMM-yyyy 
hh");   
                Date date =null;
                try {
                         date = dateFormat.parse(dateString);                   
                } catch (ParseException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                }
                  System.out.println( " Formated date :" +      date);
        }



--
View this message in context: 
http://camel.465427.n5.nabble.com/camel-bindy-2-13-1-DateFormat-Unparseable-date-tp5755843.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to