4
I have two string containing dates dataSalva
and dataDoDia
and I’m wondering if the dataDoDia
and 5 days longer than dataSalva
how do I do this
SimpleDateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
Date data = new Date();
Calendar cal = Calendar.getInstance();
cal.setTime(data);
Date data_atual = cal.getTime();
String dataDoDia= dateFormat.format(data_atual);
Caught this data_completa
and saved at the bank
Ai when I enter I open the application I want to take this date in the bank and compare with the date of the day , that I will take the same way the date has been saved
String dataSalva = banco.get();
here I will have the date that is already saved then I’ll do the top part to get the date of the day
I want to compare these two dates dataSalva
and dataDoDia
Put your code... It is better, because we will have more information, as the date format...
– Rene Sá
update her.. .. .
– Ilgner de Oliveira
data
is thedataSalva
? I imagine thatdata_atual
be theDataATual
. Your code does not match the description of the question. Does this code have any relevance? Or is the question wrong?– Maniero
I don’t have code , this one and the format of my date
– Ilgner de Oliveira
look at if it became clearer
– Ilgner de Oliveira
I gave an answer but I do not know if it is what you want since you do not have more information. I note that the last edition introduced a new name for the date.
– Maniero
I switched so as not to confuse
– Ilgner de Oliveira