When user input the date,I want to save it to database. But I'm not sure about the date format,whether I should change the format?
I'm using getter and setter method to save to database.I'm using db2
This is my code.
Code:
DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); Date startDate=user.getDate_from(); dateFormat.format(startDate); user.setDate_to(startDate);