Hi, I need help! I need to insert a the Database todays Date in the format "MM-dd-yyyy". The datatype in the dataBase is Date, then I need a Date Object with the correct format.
I already tried with SimpleDateFormat, the problem is the method Format always return a String, then from the String how I can convert to Date with the same format.
Take a look at the API docs for SimpleDateFormat, you can make use of the parse() method to return an object of type Date, also look at the parse method signature of DateFormat extended by SimpleDateFormat, you could make use of parse( String date )