Prova così:
codice:SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy HH.mm.ss"); Date d; // strTime è la stringa che contiene la data try{ d = sdf.parse(strTime); } catch(Exception e){ d = new java.util.Date(); }
mandi mandi![]()
Prova così:
codice:SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy HH.mm.ss"); Date d; // strTime è la stringa che contiene la data try{ d = sdf.parse(strTime); } catch(Exception e){ d = new java.util.Date(); }
mandi mandi![]()