All Packages Class Hierarchy This Package Previous Next Index
Class java.sql.Time
java.lang.Object
|
+----java.util.Date
|
+----java.sql.Time
- public class Time
- extends Date
This class is a thin wrapper around java.util.Date that allows
JDBC to identify this as a SQL TIME value. It adds formatting and
parsing operations to support the JDBC escape syntax for time
values.
-
Time(int, int, int)
- Construct a Time Object
-
Time(long)
- Construct a Time using a milliseconds time value
-
getDate()
- Returns the day of the month represented by this date.
-
getDay()
- Returns the day of the week represented by this date.
-
getMonth()
- Returns the month represented by this date.
-
getYear()
- Returns the year represented by this date, minus 1900.
-
setDate(int)
- Sets the day of the month of this date to the specified value.
-
setMonth(int)
- Sets the month of this date to the specified value.
-
setTime(long)
- Set a Time using a milliseconds time value
-
setYear(int)
- Sets the year of this date to be the specified value plus 1900.
-
toString()
- Format a time in JDBC date escape format
-
valueOf(String)
- Convert a string in JDBC time escape format to a Time value
Time
method Time(hour=int, -
minute=int, -
second=int) public
- Construct a Time Object
- Parameters:
- hour - 0 to 23
- minute - 0 to 59
- second - 0 to 59
Time
method Time(time=long) public
- Construct a Time using a milliseconds time value
- Parameters:
- time - milliseconds since January 1, 1970, 00:00:00 GMT
setTime
method setTime(time=long) public
- Set a Time using a milliseconds time value
- Parameters:
- time - milliseconds since January 1, 1970, 00:00:00 GMT
- Overrides:
- setTime in class Date
valueOf
method valueOf(s=String) returns Time public static
- Convert a string in JDBC time escape format to a Time value
- Parameters:
- s - time in format "hh:mm:ss"
- Returns:
- corresponding Time
toString
method toString() returns String public
- Format a time in JDBC date escape format
- Returns:
- a String in hh:mm:ss format
- Overrides:
- toString in class Date
getYear
method getYear() returns int public
- Returns the year represented by this date, minus 1900.
- Overrides:
- getYear in class Date
getMonth
method getMonth() returns int public
- Returns the month represented by this date.
- Overrides:
- getMonth in class Date
getDay
method getDay() returns int public
- Returns the day of the week represented by this date.
- Overrides:
- getDay in class Date
getDate
method getDate() returns int public
- Returns the day of the month represented by this date.
- Overrides:
- getDate in class Date
setYear
method setYear(i=int) public
- Sets the year of this date to be the specified value plus 1900.
- Overrides:
- setYear in class Date
setMonth
method setMonth(i=int) public
- Sets the month of this date to the specified value.
- Overrides:
- setMonth in class Date
setDate
method setDate(i=int) public
- Sets the day of the month of this date to the specified value.
- Overrides:
- setDate in class Date
All Packages Class Hierarchy This Package Previous Next Index