I want to convert a java.util.Date to JodaTime so as to carry out subtractions between dates. Is there a good concise way to convert from Date to JodaTime?
java.util.Date
JodaTime
Date
java.util.Date date = ... DateTime dateTime = new DateTime(date);
Make sure date isn't null, though, otherwise it acts like new DateTime() - I really don't like that.
date
null
new DateTime()
2.1m questions
2.1m answers
60 comments
57.0k users