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 )
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 )
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);
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!