I am trying to compare a date that is saved in a string to the system date... can anyone help me? here is the code...
String currentDateandTime = new SimpleDateFormat("d-M-yyyy").format(new Date());
data=preferences.getString("tgpref_data","");
Log.e("dia atual",currentDateandTime);
if(data.equals(""))
{
}
else
{
if(data.equals(currentDateandTime))
{
Log.e("do something the day have arrived","");
}
Log.e("dont do nothing","");
}