共用方式為


Timestamp Constructors

Definition

Overloads

Timestamp(Int64)

Constructs a Timestamp object using a milliseconds time value.

Timestamp(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

Timestamp(Int32, Int32, Int32, Int32, Int32, Int32, Int32)
Obsolete.

Constructs a Timestamp object initialized with the given values.

Timestamp(Int64)

Constructs a Timestamp object using a milliseconds time value.

[Android.Runtime.Register(".ctor", "(J)V", "")]
public Timestamp (long time);
[<Android.Runtime.Register(".ctor", "(J)V", "")>]
new Java.Sql.Timestamp : int64 -> Java.Sql.Timestamp

Parameters

time
Int64

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.

Attributes

Remarks

Constructs a Timestamp object using a milliseconds time value. The integral seconds are stored in the underlying date value; the fractional seconds are stored in the nanos field of the Timestamp object.

Java documentation for java.sql.Timestamp.Timestamp(long).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Timestamp(IntPtr, JniHandleOwnership)

A constructor used when creating managed representations of JNI objects; called by the runtime.

protected Timestamp (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Sql.Timestamp : nativeint * Android.Runtime.JniHandleOwnership -> Java.Sql.Timestamp

Parameters

javaReference
IntPtr

nativeint

A IntPtrcontaining a Java Native Interface (JNI) object reference.

transfer
JniHandleOwnership

A JniHandleOwnershipindicating how to handle javaReference

Remarks

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to

Timestamp(Int32, Int32, Int32, Int32, Int32, Int32, Int32)

Caution

deprecated

Constructs a Timestamp object initialized with the given values.

[Android.Runtime.Register(".ctor", "(IIIIIII)V", "")]
[System.Obsolete("deprecated")]
public Timestamp (int year, int month, int date, int hour, int minute, int second, int nano);
[<Android.Runtime.Register(".ctor", "(IIIIIII)V", "")>]
[<System.Obsolete("deprecated")>]
new Java.Sql.Timestamp : int * int * int * int * int * int * int -> Java.Sql.Timestamp

Parameters

year
Int32

the year minus 1900

month
Int32

0 to 11

date
Int32

1 to 31

hour
Int32

0 to 23

minute
Int32

0 to 59

second
Int32

0 to 59

nano
Int32

0 to 999,999,999

Attributes

Exceptions

if any of the parameters is out of range.

Remarks

Constructs a Timestamp object initialized with the given values.

This member is deprecated. instead use the constructor Timestamp(long millis)

Java documentation for java.sql.Timestamp.Timestamp(int, int, int, int, int, int, int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to