View Single Post
  #2 (permalink)  
Old 11-05-2007, 11:00 PM
hardwired hardwired is online now
Senior Member
 
Join Date: Jul 2007
Posts: 1,222
hardwired is on a distinguished road
Code:
// If you are certain of the entry format you can try // something like this. Save it as a member variable: DateFormat df = new SimpleDateFormat("yyyy-MMM-dd"); // 2001-jan-12 /** Let it parse your string into a Date. */ Date strToDate(String dateStr) { Date date = null; try { date = df.parse(dateStr); } catch(ParseException e) { // recover } return date; }
Reply With Quote