Put date in JDateChooser JAVA

0

How do I put a date consulted in a JDateChooser (JAVA)? I have tried to format it in various ways but I can not ... NOTE : I have the date in a formatted string ( yyyy / MM / dd )

    
asked by José Licea de Ortiz 23.12.2016 в 01:06
source

2 answers

0

The code is simple and with a simple search you should have found it, at least in English. What you need is this:

java.util.Date fechaParseada= new SimpleDateFormat("yyyy/MM/dd").parse(tuFecha);
jDateChooser.setDate(fechaParseada);
    
answered by 23.12.2016 / 08:43
source
0

I have been slow to see your comments for lack of access to the network and the only thing that occurred to me was to get the date formatted directly from the query ... I have already left it like that but I will try your suggestions thanks!

    
answered by 03.01.2017 в 07:05