I want to insert the current date to my oracle database Bills. I am getting the date from system using
DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
Date date = new Date();
is that possible to directly insert it into the database without converting to the default format (dd-month-yyyy) of DATE data type in Oracle?
CURRENT_DATEas a value literal in your SQL?insert into foo (some_date_column) values (current_date)SYSDATE, notCURRENT_DATE.SYSDATEis the date on the server whileCURRENT_DATEis the date on the client. I'd imagine you almost always want to insert the server's date into the database, not anything else.