简体   繁体   中英

Retrieve date value from database to jdatechooser

I have a form on which I want to access a date from the database and show in jDateChooser for a particular record. How do I get the date from the database table and how do I set that date in jDateChooser? The datatype on my database is date.

 JDateChooser.setText(a.getValueAt(selectedRowIndex, 5).toString());

this is my code and it produces error.

First what is "a"? For the looks It seems to be a Table(?)

By JDateChooser you mean the netbeans plugin? or the JDateChooser from Toedter? or anything else?

You really should provide a mcve

If you have a JDateChooser from Toedter then you can use something like

JDateChooser.setDate(<Date_from_DB>)

With this little info I can't help you more

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM