private void fillScreenFromObject() { EditText edtDataReferente = getEditTextDataReferente(); edtDataReferente.setText( UtilDate.dateToShortBrStringGmtTime( acompanhamento.getDataAcompanhamento().getTime(), false)); loadGridView(); }
private java.sql.Date getDateFromDateEdit(EditText dateEditText) { String[] strDataRefAux = dateEditText.getText().toString().split("/"); // java.sql.Date dateFromEdit = new java.sql.Date(Integer.parseInt(strDataRefAux[2].toString()), // Integer.parseInt(strDataRefAux[1].toString()), // Integer.parseInt(strDataRefAux[0].toString())); Calendar cal = Calendar.getInstance(); cal.setTimeZone(TimeZone.getTimeZone("UTC")); cal.set( Integer.parseInt(strDataRefAux[2].toString()), Integer.parseInt(strDataRefAux[1].toString()) - 1, Integer.parseInt(strDataRefAux[0].toString())); UtilDate.removeTimePart(cal); java.sql.Date dateFromEdit = new java.sql.Date(cal.getTime().getTime()); return dateFromEdit; }