How to retrieve the date of the server using H2 Database ? I am developing an application in Java, but I'm blocked at this stage. How to retrieve the date of the server from Java code?
You'll find the answer in the manual:
http://h2database.com/html/functions.html#current_timestamp
In Java
Statement stmt = connection.createStatement();
ResultSet rs = stmt.executeQuery("select current_timestamp() from dual");
rs.next();
Timestamp ts = rs.getTimestamp(1);
rs.close();
stmt.close();
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.