Hello;
I was having a problem understanding how to collect a date dataType as 1111-11-11 from a textFiels)
and set a variable that accepts ex:public Date dob;
Is there a way to get a string from an array element and parse it to conform to the Date data type?

Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException
at java.util.Date.parse(Date.java:598)
atJava.util.Date<init>(Date.java:255)
at view.forms.......
if(i==6){                               
                                AccessAllTables.getAdminBean().setDob(new java.util.Date(txtFieldArray[i].getText()));//Input=1111-11-11
                               
                            }
                            if(i==7){
                               
                                AccessAllTables.getAdminBean().setStartDate(new java.util.Date(txtFieldArray[i].getText()));//Input=1111-11-11
                              
                            }
                            if(i==8){
                               
                                AccessAllTables.getAdminBean().setEndDate(new java.util.Date(txtFieldArray[i].getText()));//Input=1111-11-11
                               
                            }

Hello
What is the best way to validate a Java form to control data to be used in a apache derby embedded db?
thanks

Thanks
I am researching spinners and JFormmatedTextFields. maybe the 3 args I need can be
produced for the Date(xxxx,xx,xx) format

Thanks
I am researching spinners and JFormmatedTextFields. maybe the 3 args I need can be
produced for the Date(xxxx,xx,xx) format

Don't use that constructor. If you have a String with this format or similar:
dd/MM/yyyy or yyyyMMdd ot MM-dd-yyyy use the simpleDateFormat.

That Date constructor is been deprecated and it is better not to use it anymore.
You can check the Calendar class, but I don't use it much

This question has already been answered. Start a new discussion instead.