I have two String variables - time1 and time2. Both contain value in the format HH:MM. How can I check:
time1
time2
if you want time between after 9PM to before 9Am you can use following condition..
if(cal.get(Calendar.HOUR_OF_DAY)> 20 || cal.get(Calendar.HOUR_OF_DAY)< 9) { // do your stuffs }