Skip to content
Advertisement

Converting Date and Gender to String using Apache-poi [closed]

 Date displayVistDate = viewInvoice.getBillingDate();        //Variables in database
 Gender displayGender = viewInvoice.getBillingGender();
 LoginUser displayCustomerID = viewInvoice.getCustomerID(); //This one has both number and character.

 tableRowOne.addNewTableCell().setText("BOXY1285");            // how do i get it here.

How can I set Date and Gender that is in the database?

Advertisement

Answer

To write Date and Gender in Cell you need to convert them to String. E.g. for Gender you can probably use either .toString() or .name(): .setText(displayGender.toString()).

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement