java - How to compare user selected date with from and to date in Android? -


this question has answer here:

i want compare user selected date date , date. e.g.,

from date : 2017-25-07 date   : 2017-31-07 selected date : 2017-27-07 

so want check selected date in range between date , date.

you can compare 3 dates below code

if(!fromdate.after(selecteddate) && !todate.before(selecteddate)) {   //fromdate <= selecteddate <= todate } 

Comments

Popular posts from this blog

python - What's the Pythonic way to report nonfatal errors in a parser? -

sql server - Deadlock occuring in Clustered Columnstore index -

Android Validators fields -