All Packages Class Hierarchy This Package Previous Next Index
Class java.sql.Date
java.lang.Object
|
+----java.util.Date
|
+----java.sql.Date
- public class Date
- extends Date
This class is a thin wrapper around java.util.Date that allows
JDBC to identify this as a SQL DATE value. It adds formatting and
parsing operations to support the JDBC escape syntax for date
values.
-
Date(int, int, int)
- Construct a Date
-
Date(long)
- Construct a Date using a milliseconds time value
-
getHours()
- Returns the hour represented by this date.
-
getMinutes()
- Returns the number of minutes past the hour represented by this date.
-
getSeconds()
- Returns the number of seconds past the minute represented by this date.
-
setHours(int)
- Sets the hour of this date to the specified value.
-
setMinutes(int)
- Sets the minutes of this date to the specified value.
-
setSeconds(int)
- Sets the seconds of this date to the specified value.
-
setTime(long)
- Set a Date using a milliseconds time value
-
toString()
- Format a date in JDBC date escape format
-
valueOf(String)
- Convert a string in JDBC date escape format to a Date value
Date
method Date(year=int, -
month=int, -
day=int) public
- Construct a Date
- Parameters:
- year - year-1900
- month - 0 to 11
- day - 1 to 31
Date
method Date(date=long) public
- Construct a Date using a milliseconds time value
- Parameters:
- date - milliseconds since January 1, 1970, 00:00:00 GMT
setTime
method setTime(date=long) public
- Set a Date using a milliseconds time value
- Parameters:
- date - milliseconds since January 1, 1970, 00:00:00 GMT
- Overrides:
- setTime in class Date
valueOf
method valueOf(s=String) returns Date public static
- Convert a string in JDBC date escape format to a Date value
- Parameters:
- s - date in format "yyyy-mm-dd"
- Returns:
- corresponding Date
toString
method toString() returns String public
- Format a date in JDBC date escape format
- Returns:
- a String in yyyy-mm-dd format
- Overrides:
- toString in class Date
getHours
method getHours() returns int public
- Returns the hour represented by this date.
- Overrides:
- getHours in class Date
getMinutes
method getMinutes() returns int public
- Returns the number of minutes past the hour represented by this date.
- Overrides:
- getMinutes in class Date
getSeconds
method getSeconds() returns int public
- Returns the number of seconds past the minute represented by this date.
- Overrides:
- getSeconds in class Date
setHours
method setHours(i=int) public
- Sets the hour of this date to the specified value.
- Overrides:
- setHours in class Date
setMinutes
method setMinutes(i=int) public
- Sets the minutes of this date to the specified value.
- Overrides:
- setMinutes in class Date
setSeconds
method setSeconds(i=int) public
- Sets the seconds of this date to the specified value.
- Overrides:
- setSeconds in class Date
All Packages Class Hierarchy This Package Previous Next Index