CodingHero
CodingHero

Reputation: 3015

Joda time: How do I find the number of milliseconds between 2 LocalTime objects?

using Joda Time how do I find the number of milliseconds between 2 LocalTime objects?

LocalTime two = new LocalTime(2,0);

LocalTime six = new LocalTime(6,0)

So the number of milliseconds between 2am and 6am?

Thanks

Upvotes: 3

Views: 3846

Answers (1)

Rodrigo Sasaki
Rodrigo Sasaki

Reputation: 7226

System.out.println(six.getMillisOfDay() - two.getMillisOfDay());

Upvotes: 6

Related Questions