How to pass values of date chooser to database?

I tried to store a date in mysql by a Date Chooser from Netbeans. But it stores date as java.text.SimpleDateFormat@8629ad2d .
This is the code I used…

String dateselect;
dateselect = dat.getDateFormat().toString();

I don’t know how to convert it to store as a date. Please help..


Source: mysql

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.