Good Day . I just wanna ask about adding days in a given date. I have a jtexfield (txtStart) and another jtexfield(txtExpiry). I need to display in txtExpiry the date after 102
Use
yyyy-MM-dd
Note: Capital MM
See : SimpleDateFormat
Now, once you have the date instance you could use Calendar to do the days arithmetic
Calendar
Calendar cal = Calendar.getInstance(); cal.setTime(parsedDate); cal.add(Calendar.DATE, 102); String expDateString = dateFormatter.format(cal.getTime());