public Date getDate ( ) { Date date = new Date ( ) ; try { String dateText = field . getText ( ) ; SimpleDateFormat fmt = new SimpleDateFormat ( format ) ; date = fmt . parse ( dateText ) ; } catch ( Exception e ) { } return date ; }
Convert text of textfield to Date