Fórum Converter Data para String #565170
09/04/2009
0

Andvenancio
Curtir tópico
+ 0Posts
09/04/2009
Matheus Trevizan
Gostei + 0
09/04/2009
Andvenancio
1 | ftData.setText(converteData(regUsuario.getdata()); |
1 2 3 4 5 6 7 8 9 10 | protected String converteData(java.util.Date dtData){ SimpleDateFormat formatBra; formatBra = new SimpleDateFormat("dd/MM/yyyy"); try { java.util.Date newData = formatBra.parse(dtData.toString()); return (formatBra.format(newData)); } catch (ParseException Ex) { return "Erro na conversão da data"; } } |
Gostei + 0
09/04/2009
Ronie Uliana
1 2 3 4 | SimpleDateFormat in= new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat out = new SimpleDateFormat("dd/MM/yyyy"); String result = out.format(in.parse(date.toString())); |
Gostei + 0
09/04/2009
Andvenancio
Gostei + 0
09/04/2009
Andvenancio
Gostei + 0
09/04/2009
Dalton
1 2 3 | SimpleDateFormat out = new SimpleDateFormat("dd/MM/yyyy"); String result = out.format(new Date()); |
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)