I'm doing a collaborative application for android, so I made a server in PHP, and I send the data to this server.
For a given query I need to pass a date, from a Date Picker, here's the code:
String myFormat = "dd-MM-yy"; //In which you need put here
SimpleDateFormat sdf = new SimpleDateFormat(myFormat, Locale.US);
et_data.setText(sdf.format(myCalendar.getTime()));
String data = sdf.format(myCalendar.getTime()) +"";
The variable date is passed to the server, but on the server it is not interpreting as text.
But if I set the variable date as:
String data = "12-02-2018";
It works normally. The value that arrives on the server is the same, and the type is also String.
Does anyone know what it can be?