Reputation: 2667
i am having the set of times in database and i want to compare with current time in computer .how it be done pls help me!!
Upvotes: 1
Views: 805
Reputation: 43088
use Date.before()
or Date.compareTo()
methods:
Date now = new Date();
Date date = ... //obtain it from db here
if (now.before(date)) {
Log.d("date is in the future");
}
Upvotes: 3