Raju
Raju

Reputation: 1467

How to retain Timestamp in Camel Bindy, while exporting the POJO to CSV

Hi I am exporting a POJO to CSV using camel bindy. I have a field which is Timestamp.

@DataField(pos=2,pattern = "dd-MM-yyyy")
private Timestamp createdDate;

Now I am getting an error while saving it to CSV, Can not find a suitable formatter for the type: java.sql.Timestamp

In documentation i only see pattern for Date. Can someone help me how to retain Timestamp. Thank you.

Upvotes: 1

Views: 437

Answers (1)

Claus Ibsen
Claus Ibsen

Reputation: 55750

bindy does not support java.sql.Timestamp. Maybe use the java.util.Date instead.

Upvotes: 1

Related Questions