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()
1.4m articles
1.4m replys
5 comments
57.0k users