I want to convert the com.datastax.driver.core.LocalDate
object returned by the API to yyyy-MM-dd
format. How can I do that?
I tried below code but it is not working for com.datastax.driver.core.LocalDate
-
@JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd")
String date;
I am not sure how you can do it using annotation but below is one way of explicitly converting
com.datastax.driver.core.LocalDate
toyyyy-MM-dd
format -