i want to convert the value of my date into an integer value, i am using a jDateChooser in netbeans(swings)
currently in my code below the value for inputDate is fixed or assingned but i want it to be based on the date a user picks using the jDateChooser.
public void OnDateClick(){
int inputDate = 20121220 ;//variable name for my jDateChooser is "OnDateClick" which i want assign to inputDate
DateFormat df = new SimpleDateFormat("yyyyMMdd");
String date = df.format(Integer.valueOf(inputDate));
String s = date.format(date);
int output = Integer.valueOf(s);
System.out.println(s);
}
I will appreciate the help thank you.