Converting DateTime from mongodb to LocalDate
I have a date in mongo:
"lastUpdate":{
"date":"2014-12-04T16:41:31.394+0100"
},
And I would like to convert to LocalDate, I tried a converter like this:
@ReadingConverter
public class DateToLocalDateConverter implements Converter<DateTime, LocalDate> {
@Override
public LocalDate convert(DateTime source) {
log.debug("inside");
return new DateTime();
}
}
But I didn’t handle it. Can anyone help me?
Thank you
+3
source to share
No one has answered this question yet
Check out similar questions: