Android : Android compare date yyyy-mm-dd [duplicate]

on Tuesday, July 29, 2014



This question already has an answer here:




I want to compare a date. I have a date like this String start_date = "2014-06-01";.


I want to compare it with current date, so if the current date is still under the start date, some icon won't show.


I already get the current date



Date cDate = new Date();
String nDate = new SimpleDateFormat("yyyy-MM-dd").format(cDate);
TextView date = (TextView) getView().findViewById(R.id.date);
date.setText(nDate);


But, i confused how to compare it with the date that I have.


0 comments:

Post a Comment