Hi,

Can you provide an example that we could test as the date pattern used
seems good. So, we should have a look to the code to see why it failed for
you.

Regards,


On Fri, Feb 20, 2015 at 2:00 AM, kc525 <kirankumar.chitt...@gmail.com>
wrote:

> I ran into an issue with Apache Camel Bindy data format for the Date field
> parsing from a CSV file.
>
> *Date in the CSV : 02/11/2015 03:34:49 PM.*
>
> Format in the Bindy Class annotated as
>
> *@DataField(pos = 8,pattern="MM/dd/yyyy hh:mm:ss a")
> private Date time;*
>
> Getting below exception
>
> java.lang.IllegalArgumentException: Date provided does not fit the pattern
> defined, position: 8, line: 1 at
>
> org.apache.camel.dataformat.bindy.BindyCsvFactory.bind(BindyCsvFactory.java:213)
> at
>
> org.apache.camel.dataformat.bindy.csv.BindyCsvDataFormat.unmarshal(BindyCsvDataFormat.java:185)
> at
>
> org.apache.camel.processor.UnmarshalProcessor.process(UnmarshalProcessor.java:67)
> It works if the date in the CSV is given as 2/11/2015 03:34:49 PM, with no
> preceeding 0 in the Month field.
>
> I am using Camel 2.14.1.
>
> Am I doing anything wrong here ? Please advise.
>
> Thanks.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Bindy-Date-Unmarshall-Issue-tp5762960.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Charles Moulliard
Apache Committer / Architect @RedHat
Twitter : @cmoulliard | Blog :  http://cmoulliard.github.io

Reply via email to