question: public static Date stringToDate ( String datstr ) { SimpleDateFormat fmt = ComponentTime . makeInputFormatter ( ) ; ParsePosition zero = new ParsePosition ( 0 ) ; if ( datstr . length ( ) > 23 ) datstr = datstr . substring ( 0 , 23 ) ; return ( fmt . parse ( datstr , zero ) ) ; }
target:  Convert a String to a Java Date