|
Java™ by example!
|
|
|
How do I insert a value in a column where the type is datetime?
This example assumes that you have set up the table orders from this answer. orders looks like this:
The following example will populate this table with 4 rows, date is passed in as a java.util.Date and converted to a java.sql.Timestamp. Main.java:
This is the result:
Further Information
Author of answer: Joris Van den Bogaert
Comments to this answer are only viewable by members. Login or become a member!
|
|
|
|
|