03/24/2013 21:54
How to convert a string in the date in Java Object?
Its use,
string s = "03/24 / 2013 21:54 "; SimpleDateFormat simpleDateFormat = New SimpleDateFormat ("MM / dd / yyyy HH: mm"); Try {date date = simpleDateFormat.parse (s); System.out.println ("Date:" + SimpleDateform Format (date)); } Hold (ParseException pre) {System.out.println ("exception" + pre); }
Comments
Post a Comment