<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<!--NewPage-->
<html>
<head>
<!-- Generated by javadoc on Wed Jul 28 01:21:15 GMT 1999 -->
<title>
  Class java.sql.Timestamp
</title>
</head>
<body>
<a name="_top_"></a>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.sql.html">This Package</a>  <a href="java.sql.Time.html#_top_">Previous</a>  <a href="java.sql.Types.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
<hr>
<h1>
  Class java.sql.Timestamp
</h1>
<pre>
<a href="java.lang.Object.html#_top_">java.lang.Object</a>
   |
   +----<a href="java.util.Date.html#_top_">java.util.Date</a>
           |
           +----java.sql.Timestamp
</pre>
<hr>
<dl>
  <dt> public class <b>Timestamp</b>
  <dt> extends <a href="java.util.Date.html#_top_">Date</a>
</dl>
<P>This class is a thin wrapper around java.util.Date that allows
 JDBC to identify this as a SQL TIMESTAMP value. It adds the ability
 to hold the SQL TIMESTAMP nanos value and provides formatting and
 parsing operations to support the JDBC escape syntax for timestamp
 values.
 <P><B>Note:</B> This type is a composite of a java.util.Date and a
 separate nanos value. Only integral seconds are stored in the
 java.util.Date component. The fractional seconds - the nanos - are
 separate. The getTime method will only return integral seconds. If
 a time value that includes the fractional seconds is desired you
 must convert nanos to milliseconds (nanos/1000000) and add this to
 the getTime value. Also note that the hashcode() method uses the
 underlying java.util.Data implementation and therefore does not
 include nanos in its computation.
<p>
<hr>
<a name="index"></a>
<h2>
  <img src="images/constructor-index.gif" width=275 height=38 alt="Constructor Index">
</h2>
<dl>
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Timestamp(int, int, int, int, int, int, int)"><b>Timestamp</b></a>(int, int, int, int, int, int, int)
  <dd>  Construct a Timestamp Object

 
  <dt> <img src="images/yellow-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#Timestamp(long)"><b>Timestamp</b></a>(long)
  <dd>  Construct a Timestamp using a milliseconds time value.
</dl>
<h2>
  <img src="images/method-index.gif" width=207 height=38 alt="Method Index">
</h2>
<dl>
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#after(java.sql.Timestamp)"><b>after</b></a>(Timestamp)
  <dd>  Is this timestamp later than the timestamp argument?

 
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#before(java.sql.Timestamp)"><b>before</b></a>(Timestamp)
  <dd>  Is this timestamp earlier than the timestamp argument?

 
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#equals(java.sql.Timestamp)"><b>equals</b></a>(Timestamp)
  <dd>  Test Timestamp values for equality

 
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#getNanos()"><b>getNanos</b></a>()
  <dd>  Get the Timestamp's nanos value

 
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#setNanos(int)"><b>setNanos</b></a>(int)
  <dd>  Set the Timestamp's nanos value

 
  <dt> <img src="images/red-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#toString()"><b>toString</b></a>()
  <dd>  Format a timestamp in JDBC timestamp escape format

 
  <dt> <img src="images/green-ball-small.gif" width=6 height=6 alt=" o ">
	<a href="#valueOf(java.lang.String)"><b>valueOf</b></a>(String)
  <dd>  Convert a string in JDBC timestamp escape format to a Timestamp value

 
</dl>
<a name="constructors"></a>
<h2>
  <img src="images/constructors.gif" width=231 height=38 alt="Constructors">
</h2>
<a name="Timestamp"></a>
<a name="Timestamp(int, int, int, int, int, int, int)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Timestamp</b>
<pre>
 public Timestamp(int year,
                  int month,
                  int date,
                  int hour,
                  int minute,
                  int second,
                  int nano)
</pre>
<dl>
  <dd> Construct a Timestamp Object
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> year - year-1900
    <dd> month - 0 to 11
    <dd> day - 1 to 31
    <dd> hour - 0 to 23
    <dd> minute - 0 to 59
    <dd> second - 0 to 59
    <dd> nano - 0 to 999,999,999
  </dl></dd>
</dl>
<a name="Timestamp(long)"><img src="images/yellow-ball.gif" width=12 height=12 alt=" o "></a>
<b>Timestamp</b>
<pre>
 public Timestamp(long time)
</pre>
<dl>
  <dd> Construct a Timestamp using a milliseconds time value. The
 integral seconds are stored in the underlying date value; the
 fractional seconds are stored in the nanos value.
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> time - milliseconds since January 1, 1970, 00:00:00 GMT
  </dl></dd>
</dl>
<a name="methods"></a>
<h2>
  <img src="images/methods.gif" width=151 height=38 alt="Methods">
</h2>
<a name="valueOf(java.lang.String)"><img src="images/green-ball.gif" width=12 height=12 alt=" o "></a>
<a name="valueOf"><b>valueOf</b></a>
<pre>
 public static <a href="#_top_">Timestamp</a> valueOf(<a href="java.lang.String.html#_top_">String</a> s)
</pre>
<dl>
  <dd> Convert a string in JDBC timestamp escape format to a Timestamp value
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> s - timestamp in format "yyyy-mm-dd hh:mm:ss.fffffffff"
    <dt> <b>Returns:</b>
    <dd> corresponding Timestamp
  </dl></dd>
</dl>
<a name="toString()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="toString"><b>toString</b></a>
<pre>
 public <a href="java.lang.String.html#_top_">String</a> toString()
</pre>
<dl>
  <dd> Format a timestamp in JDBC timestamp escape format
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> a String in yyyy-mm-dd hh:mm:ss.fffffffff format
    <dt> <b>Overrides:</b>
    <dd> <a href="java.util.Date.html#toString()">toString</a> in class <a href="java.util.Date.html#_top_">Date</a>
  </dl></dd>
</dl>
<a name="getNanos()"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="getNanos"><b>getNanos</b></a>
<pre>
 public int getNanos()
</pre>
<dl>
  <dd> Get the Timestamp's nanos value
<p>
  <dd><dl>
    <dt> <b>Returns:</b>
    <dd> the Timestamp's fractional seconds component
  </dl></dd>
</dl>
<a name="setNanos(int)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="setNanos"><b>setNanos</b></a>
<pre>
 public void setNanos(int n)
</pre>
<dl>
  <dd> Set the Timestamp's nanos value
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> n - the new fractional seconds component
  </dl></dd>
</dl>
<a name="equals(java.sql.Timestamp)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="equals"><b>equals</b></a>
<pre>
 public boolean equals(<a href="#_top_">Timestamp</a> ts)
</pre>
<dl>
  <dd> Test Timestamp values for equality
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ts - the Timestamp value to compare with
  </dl></dd>
</dl>
<a name="before(java.sql.Timestamp)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="before"><b>before</b></a>
<pre>
 public boolean before(<a href="#_top_">Timestamp</a> ts)
</pre>
<dl>
  <dd> Is this timestamp earlier than the timestamp argument?
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ts - the Timestamp value to compare with
  </dl></dd>
</dl>
<a name="after(java.sql.Timestamp)"><img src="images/red-ball.gif" width=12 height=12 alt=" o "></a>
<a name="after"><b>after</b></a>
<pre>
 public boolean after(<a href="#_top_">Timestamp</a> ts)
</pre>
<dl>
  <dd> Is this timestamp later than the timestamp argument?
<p>
  <dd><dl>
    <dt> <b>Parameters:</b>
    <dd> ts - the Timestamp value to compare with
  </dl></dd>
</dl>
<hr>
<pre>
<a href="packages.html">All Packages</a>  <a href="tree.html">Class Hierarchy</a>  <a href="Package-java.sql.html">This Package</a>  <a href="java.sql.Time.html#_top_">Previous</a>  <a href="java.sql.Types.html#_top_">Next</a>  <a href="AllNames.html">Index</a></pre>
</body>
</html>
