📄 timestamp.html
字号:
</TR></TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class java.lang.<A HREF="../../java/lang/Object.html">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="../../java/lang/Object.html#finalize()">finalize</A>, <A HREF="../../java/lang/Object.html#getClass()">getClass</A>, <A HREF="../../java/lang/Object.html#notify()">notify</A>, <A HREF="../../java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="../../java/lang/Object.html#wait()">wait</A>, <A HREF="../../java/lang/Object.html#wait(long)">wait</A>, <A HREF="../../java/lang/Object.html#wait(long, int)">wait</A></CODE></TD></TR></TABLE> <P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="Timestamp(int, int, int, int, int, int, int)"><!-- --></A><H3>Timestamp</H3><PRE>public <B>Timestamp</B>(int year, int month, int date, int hour, int minute, int second, int nano)</PRE><DL><DD><B>Deprecated.</B> <I>instead use the constructor <code>Timestamp(long millis)</code></I><P><DD>Constructs a <code>Timestamp</code> object initialized with the given values.<DD><DL><DT><B>Parameters:</B><DD><CODE>year</CODE> - year-1900<DD><CODE>month</CODE> - 0 to 11<DD><CODE>date</CODE> - 1 to 31<DD><CODE>hour</CODE> - 0 to 23<DD><CODE>minute</CODE> - 0 to 59<DD><CODE>second</CODE> - 0 to 59<DD><CODE>nano</CODE> - 0 to 999,999,999</DL></DD></DL><HR><A NAME="Timestamp(long)"><!-- --></A><H3>Timestamp</H3><PRE>public <B>Timestamp</B>(long time)</PRE><DL><DD>Constructs a <code>Timestamp</code> object using a milliseconds time value. The integral seconds are stored in the underlying date value; the fractional seconds are stored in the <code>nanos</code> field of the <code>Timestamp</code> object.<DD><DL><DT><B>Parameters:</B><DD><CODE>time</CODE> - milliseconds since January 1, 1970, 00:00:00 GMT. A negative number is the number of milliseconds before January 1, 1970, 00:00:00 GMT.</DL></DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="valueOf(java.lang.String)"><!-- --></A><H3>valueOf</H3><PRE>public static <A HREF="../../java/sql/Timestamp.html">Timestamp</A> <B>valueOf</B>(<A HREF="../../java/lang/String.html">String</A> s)</PRE><DL><DD>Converts a <code>String</code> object in JDBC timestamp escape format to a <code>Timestamp</code> value.<DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - timestamp in format <code>yyyy-mm-dd hh:mm:ss.fffffffff</code><DT><B>Returns:</B><DD>corresponding <code>Timestamp</code> value<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the given argument does not have the format <code>yyyy-mm-dd hh:mm:ss.fffffffff</code></DL></DD></DL><HR><A NAME="toString()"><!-- --></A><H3>toString</H3><PRE>public <A HREF="../../java/lang/String.html">String</A> <B>toString</B>()</PRE><DL><DD>Formats a timestamp in JDBC timestamp escape format.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/Date.html#toString()">toString</A></CODE> in class <CODE><A HREF="../../java/util/Date.html">Date</A></CODE></DL></DD><DD><DL><DT><B>Returns:</B><DD>a <code>String</code> object in <code>yyyy-mm-dd hh:mm:ss.fffffffff</code> format</DL></DD></DL><HR><A NAME="getNanos()"><!-- --></A><H3>getNanos</H3><PRE>public int <B>getNanos</B>()</PRE><DL><DD>Gets this <code>Timestamp</code> object's <code>nanos</code> value.<DD><DL><DT><B>Returns:</B><DD>this <code>Timestamp</code> object's fractional seconds component</DL></DD></DL><HR><A NAME="setNanos(int)"><!-- --></A><H3>setNanos</H3><PRE>public void <B>setNanos</B>(int n)</PRE><DL><DD>Sets this <code>Timestamp</code> object's <code>nanos</code> field to the given value.<DD><DL><DT><B>Parameters:</B><DD><CODE>n</CODE> - the new fractional seconds component<DT><B>Throws:</B><DD><CODE><A HREF="../../java/lang/IllegalArgumentException.html">IllegalArgumentException</A></CODE> - if the given argument is greater than 999999999 or less than 0</DL></DD></DL><HR><A NAME="equals(java.sql.Timestamp)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="../../java/sql/Timestamp.html">Timestamp</A> ts)</PRE><DL><DD>Tests to see if this <code>Timestamp</code> object is equal to the given <code>Timestamp</code> object.<DD><DL><DT><B>Parameters:</B><DD><CODE>ts</CODE> - the <code>Timestamp</code> value to compare with</DL></DD></DL><HR><A NAME="equals(java.lang.Object)"><!-- --></A><H3>equals</H3><PRE>public boolean <B>equals</B>(<A HREF="../../java/lang/Object.html">Object</A> ts)</PRE><DL><DD>Tests to see if this <code>Timestamp</code> object is equal to the given object. This version of the method <code>equals</code> has been added to fix the incorrect signature of <code>Timestamp.equals(Timestamp)</code> and to preserve backward compatibility with existing class files. Note: This method is not symmetric with respect to the <code>equals(Object)</code> method in the base class.<DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../java/util/Date.html#equals(java.lang.Object)">equals</A></CODE> in class <CODE><A HREF="../../java/util/Date.html">Date</A></CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>ts</CODE> - the <code>Object</code> value to compare with</DL></DD></DL><HR><A NAME="before(java.sql.Timestamp)"><!-- --></A><H3>before</H3><PRE>public boolean <B>before</B>(<A HREF="../../java/sql/Timestamp.html">Timestamp</A> ts)</PRE><DL><DD>Indicates whether this <code>Timestamp</code> object is earlier than the given <code>Timestamp</code> object.<DD><DL><DT><B>Parameters:</B><DD><CODE>ts</CODE> - the <code>Timestamp</code> value to compare with<DT><B>Returns:</B><DD><code>true</code> if this <code>Timestamp</code> object is earlier; <code>false</code> otherwise</DL></DD></DL><HR><A NAME="after(java.sql.Timestamp)"><!-- --></A><H3>after</H3><PRE>public boolean <B>after</B>(<A HREF="../../java/sql/Timestamp.html">Timestamp</A> ts)</PRE><DL><DD>Indicates whether this <code>Timestamp</code> object is later than the given <code>Timestamp</code> object.<DD><DL><DT><B>Parameters:</B><DD><CODE>ts</CODE> - the <code>Timestamp</code> value to compare with<DT><B>Returns:</B><DD><code>true</code> if this <code>Timestamp</code> object is later; <code>false</code> otherwise</DL></DD></DL><!-- ========= END OF CLASS DATA ========= --><HR><!-- ========== START OF NAVBAR ========== --><A NAME="navbar_bottom"><!-- --></A><TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"><TR><TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"><A NAME="navbar_bottom_firstrow"><!-- --></A><TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/Timestamp.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM><b>Java<sup><font size=-2>TM</font></sup> 2 Platform<br>Std. Ed. v1.3</b></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../java/sql/Time.html"><B>PREV CLASS</B></A> <A HREF="../../java/sql/Types.html"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Timestamp.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD></TR><TR><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | FIELD | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><!-- =========== END OF NAVBAR =========== --><HR><font size="-1"><a href="http://java.sun.com/cgi-bin/bugreport.cgi">Submit a bug or feature</a><br>For further API reference and developer documentation, see <a href="http://java.sun.com/products/jdk/1.3/devdocs-vs-specs.html">Java 2 SDK SE Developer Documentation</a>. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples. <p>Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.<br>Copyright 1993-2000 Sun Microsystems, Inc. 901 San Antonio Road<br>Palo Alto, California, 94303, U.S.A. All Rights Reserved.</font></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -