It has a way but it depends on what you need. You have to see what your database is waiting for. You are sending the data in a different type than the one expected by the database. So you need to find out what the expected type is and send it this way.
SimpleDateFormat()
is to mount strings even and not to format dates, because dates have no format, dates are dates. Only texts that show dates are formatted. On a date what matters is the value contained in it and not the way it is presented.
In fact, the author discovered that he needed to use Timestamp()
.