|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Date | +--java.sql.Date
This class is a thin wrapper around a millisecond value that allows JDBC to identify this as a SQL DATE. A milliseconds value represents the number of milliseconds that have passed since January 1, 1970 00:00:00.000 GMT. To conform with the definition of SQL DATE, the millisecond values wrapped by a java.sql.Date instance must be 'normalized' by setting the hours, minutes, seconds, and milliseconds to zero in the particular time zone with which the instance is associated.
Constructor Summary | |
Date(int year,
int month,
int day)
Deprecated. |
|
Date(long date)
Construct a Date using a milliseconds time value |
Method Summary | |
int | getHours()
Deprecated. |
int | getMinutes()
Deprecated. |
int | getSeconds()
Deprecated. |
void | setHours(int i)
Deprecated. |
void | setMinutes(int i)
Deprecated. |
void | setSeconds(int i)
Deprecated. |
void | setTime(long date)
Set a Date using a milliseconds time value |
String | toString()
Format a date in JDBC date escape format |
static Date | valueOf(String s)
Convert a string in JDBC date escape format to a Date value |
Methods inherited from class java.util.Date | |
after , before , compareTo , compareTo , equals , getDate , getDay , getMonth , getTime , getTimezoneOffset , getYear , hashCode , parse , setDate , setMonth , setYear , toGMTString , toLocaleString , UTC |
Methods inherited from class java.lang.Object | |
clone , finalize , getClass , notify , notifyAll , wait , wait , wait |
Constructor Detail |
public Date(int year, int month, int day)
year
- year-1900
month
- 0 to 11
day
- 1 to 31public Date(long date)
date
- milliseconds since January 1, 1970, 00:00:00 GMTMethod Detail |
public void setTime(long date)
date
- milliseconds since January 1, 1970, 00:00:00 GMTpublic static Date valueOf(String s)
s
- date in format "yyyy-mm-dd"public String toString()
public int getHours()
public int getMinutes()
public int getSeconds()
public void setHours(int i)
public void setMinutes(int i)
public void setSeconds(int i)
|
Java Platform 1.2 Beta 4 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |