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
spring-data mongodb


source to share


No one has answered this question yet

Check out similar questions:

1299
How to query MongoDB with "how"?
825
How to delete MongoDB database from command line?
619
MongoDB vs Kassandra
405
Delete everything in MongoDB database
285
Random entry from MongoDB
3
Sort by date in Datetime field in mongo
2
Error while entering joda DateTime into MongoDB via Spring data
1
Storing DateTime in MongoDB affects performance
0
Convert MongoDB id to date and time in Power BI
0
Covert RFC3339 DateTime to date in java



All Articles
Loading...
X
Show
Funny
Dev
Pics