Index (Frames) | Index (No Frames) | Package | Package Tree | Tree
java.sql

Class Date

java.lang.Object
|
+--java.util.Date
   |
   +--java.sql.Date


public class Date

extends Date

This class is a wrapper around java.util.Date to allow the JDBC driver to identify the value as a SQL Date.

Author:

Constructor Summary

Date(int year, int month, int day)

This method initializes a new instance of this class with the specified year, month, and day.
Date(long date)

This method initializes a new instance of this class with the specified time value representing the number of seconds since Jan 1, 1970 at 12:00 midnight GMT.

Method Summary

java.lang.StringtoString()

This method returns this date in JDBC format.
static java.sql.DatevalueOf(java.lang.String str)

This method returns a new instance of this class by parsing a date in JDBC format into a Java date.

Constructor Details

Date

public Date(int year, int month, int day)

This method initializes a new instance of this class with the specified year, month, and day.

Parameters:


Date

public Date(long date)

This method initializes a new instance of this class with the specified time value representing the number of seconds since Jan 1, 1970 at 12:00 midnight GMT.

Parameters:


Method Details

toString

public String toString()

This method returns this date in JDBC format.

Returns:


valueOf

public static Date valueOf(java.lang.String str)

This method returns a new instance of this class by parsing a date in JDBC format into a Java date.

Parameters:

Returns: