- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
private Date value;
private SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy HH:mm:ss");
private SimpleDateFormat sdfshort = new SimpleDateFormat("dd.MM.yyyy");
void setValue(String value) {
try {
if (value.length() >= 18)
this.value = sdf.parse(value);
else
this.value = sdfshort.parse(value);
} catch (ParseException e) {
this.value = sdfshort.parse(value);
}
}
guest 25.04.2014 12:32 # +1