I got the following variables to begin with the conversion process of a date:
val format = "dd/MM/yyyy"
val sdf = SimpleDateFormat(format, Locale("pt", "PT"))
Until here everything ok. Then I got some values (val_1
and val_2
) that correspond to dates(like this "01/01/2001" in string) picked up from editexts
. (I don't think this is important to write, but gives the question some context).
The problem is that I want the date to have first the day, then the month and finally the year, just like the format
... but this is what android gives:
As you can see, it gives me first the month, then the day...and in this way, my program doesn't work at all. Whan can I do?