Name
Time
Synopsis
A wrapper around the java.util.Date
class that adjusts the time value (milliseconds since January 1, 1970 0:00:00 GMT) to conform to the SQL TIME
specification. The TIME
type only deals with the time of day, so the date components are set to January 1, 1970 and should not be altered. The Time
class also includes a static valueOf()
method that decodes the JDBC Time
escape syntax hh
:
mm
:
ss
into a Time
value.
public class Time extends java.util.Date { // Public Constructors public Time( long time); public Time( int hour, int minute, int second); // # // Public Class Methods public static Time valueOf( String s); // Public Methods Overriding Date public void setTime( long time); public String toString(); // Deprecated Public Methods public int getDate(); // Overrides:Date, # public int getDay(); // Overrides:Date, # public int getMonth(); // Overrides:Date, # public int getYear(); // Overrides:Date, # public void setDate( int i); // Overrides:Date, # public void setMonth( int i); // Overrides:Date, # public void setYear( int i); // Overrides:Date, # }
Passed To
CallableStatement.setTime()
, PreparedStatement.setTime()
, java.sql.ResultSet.updateTime()
, SQLOutput.writeTime()
, javax.sql.RowSet.setTime()
Returned By
CallableStatement.getTime()
, java.sql.ResultSet.getTime()
, SQLInput.readTime()
, Time.valueOf()
Get Java Enterprise in a Nutshell, Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.