The code snippet below inserts a record with date into the database.

Java Code:
PreparedStatement p = theConn.prepareStatement
    ("insert into TableWithADateColumn values(?)");
p.setDate(1, sqlToday);
p.executeUpdate();