Unanswered: Best way to inpu Dates from Java application in MySQL
I'm pretty new to mysql, and a little expirienced in Java and i've come to a problem. I need to put a date that a user inputs in a form in the app in a table field of the type DATE in mysql. I dont need the time, only the Date. The Date format in my area is dd/MM/yyyy. I'm trying something with a JFormattedTextField, although that's new to me too.
So, i want to know the best way to make that text field (formatted or not) to accept only values in the format mentioned above, and to input that(after Ok is clicked) in a mysql table field without too many lines of code if its possible. I hope this is an easy question for an expirienced programmer. Thanks.
I don't think I understand what are you saying exactly. I want the users to input the date in the dd/MM/yyyy format. I'm thinking now is there a way to remember that value as some date object and then change the format to what mysql can recognize. Actually is there a way to input values in mysql using some date object or do i have to parse the date value as a String and enter it "manually". And how do i make the text field initialize to the current date, because it's highly unlikely that it will require changes.