Freigeben über


Date Constructors

Definition

Overloads

Date(Int64)

Constructs a Date object using the given milliseconds time value.

Date(IntPtr, JniHandleOwnership)

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

Date(Int32, Int32, Int32)
Obsolete.

Constructs a Date object initialized with the given year, month, and day.

Date(Int64)

Constructs a Date object using the given milliseconds time value.

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

Parameters

date
Int64

milliseconds since January 1, 1970, 00:00:00 GMT not to exceed the milliseconds representation for the year 8099. A negative number indicates the number of milliseconds before January 1, 1970, 00:00:00 GMT.

Attributes

Remarks

Constructs a Date object using the given milliseconds time value. If the given milliseconds value contains time information, the driver will set the time components to the time in the default time zone (the time zone of the Java virtual machine running the application) that corresponds to zero GMT.

Java documentation for java.sql.Date.Date(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

Date(IntPtr, JniHandleOwnership)

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

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

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

Date(Int32, Int32, Int32)

Caution

deprecated

Constructs a Date object initialized with the given year, month, and day.

[Android.Runtime.Register(".ctor", "(III)V", "")]
[System.Obsolete("deprecated")]
public Date (int year, int month, int day);
[<Android.Runtime.Register(".ctor", "(III)V", "")>]
[<System.Obsolete("deprecated")>]
new Java.Sql.Date : int * int * int -> Java.Sql.Date

Parameters

year
Int32

the year minus 1900; must be 0 to 8099. (Note that 8099 is 9999 minus 1900.)

month
Int32

0 to 11

day
Int32

1 to 31

Attributes

Remarks

Constructs a Date object initialized with the given year, month, and day.

The result is undefined if a given argument is out of bounds.

This member is deprecated. instead use the constructor Date(long date)

Java documentation for java.sql.Date.Date(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