OracleDateTime OracleDateTime OracleDateTime OracleDateTime Struct

定义

表示日期和时间数据,取值范围从公元前 4712 年 1 月 1 日 到公元 4712 年 12 月 31 日。Represents date and time data ranging in value from January 1, 4712 BC to December 31, 4712 AD.

public value class OracleDateTime : IComparable, System::Data::SqlTypes::INullable
public struct OracleDateTime : IComparable, System.Data.SqlTypes.INullable
type OracleDateTime = struct
    interface INullable
Public Structure OracleDateTime
Implements IComparable, INullable
继承
OracleDateTimeOracleDateTimeOracleDateTimeOracleDateTime
实现

注解

若要获取OracleDateTime对象,请调用GetOracleDateTime方法。To obtain an OracleDateTime object, call the GetOracleDateTime method.

最小有效日期OracleDateTime结构是 0001 年 1 月 1 日 00:00:00。The minimum valid date for an OracleDateTime structure is 1/1/0001 00:00:00. 但是,Oracle 支持日期早公元前 4712 年 1 月 1。However, Oracle supports dates as early as January 1, 4712 BC. 若要将绑定 BC 日期,请使用String参数和 Oracle TO_DATE 或 TO_CHAR 转换函数的输入和输出参数分别。To bind BC dates, use a String parameter and the Oracle TO_DATE or TO_CHAR conversion functions for input and output parameters respectively.

构造函数

OracleDateTime(OracleDateTime) OracleDateTime(OracleDateTime) OracleDateTime(OracleDateTime) OracleDateTime(OracleDateTime)

从现有 OracleDateTime 对象初始化 OracleDateTime 结构的新实例。Initializes a new instance of the OracleDateTime structure from an existing OracleDateTime object.

OracleDateTime(DateTime) OracleDateTime(DateTime) OracleDateTime(DateTime) OracleDateTime(DateTime)

用指定的 OracleDateTime 初始化 DateTime 结构的新实例。Initializes a new instance of the OracleDateTime structure with the specified DateTime.

OracleDateTime(Int64) OracleDateTime(Int64) OracleDateTime(Int64) OracleDateTime(Int64)

使用所提供的刻度数初始化 OracleDateTime 结构的新实例。Initializes a new instance of the OracleDateTime structure using the supplied number of ticks.

OracleDateTime(Int32, Int32, Int32) OracleDateTime(Int32, Int32, Int32) OracleDateTime(Int32, Int32, Int32) OracleDateTime(Int32, Int32, Int32)

通过使用所提供的参数初始化新结构的年、月和日来初始化 OracleDateTime 结构的新实例。Initializes a new instance of the OracleDateTime structure using the supplied parameters to initialize the year, month, and day of the new structure.

OracleDateTime(Int32, Int32, Int32, Calendar) OracleDateTime(Int32, Int32, Int32, Calendar) OracleDateTime(Int32, Int32, Int32, Calendar) OracleDateTime(Int32, Int32, Int32, Calendar)

通过使用所提供的参数初始化新结构的年、月、日和日历,来初始化 OracleDateTime 结构的新实例。Initializes a new instance of the OracleDateTime structure using the supplied parameters to initialize the year, month, day, and calendar of the new structure.

OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32) OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32) OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32) OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32)

通过使用所提供的参数初始化新结构的年、月、日、小时、分钟和秒,来初始化 OracleDateTime 结构的新实例。Initializes a new instance of the OracleDateTime structure using the supplied parameters to initialize the year, month, day, hour, minute, and second of the new structure.

OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Calendar) OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Calendar) OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Calendar) OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Calendar)

通过使用所提供的参数初始化新结构指定日历的年、月、日、小时、分钟和秒,来初始化 OracleDateTime 结构的新实例。Initializes a new instance of the OracleDateTime structure using the supplied parameters to initialize the year, month, day, hour, minute, and second for the specified calendar of the new structure.

OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)

通过使用所提供的参数初始化新结构的年、月、日、小时、分钟、秒和毫秒,来初始化 OracleDateTime 结构的新实例。Initializes a new instance of the OracleDateTime structure using the supplied parameters to initialize the year, month, day, hour, minute, second, and millisecond of the new structure.

OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Calendar) OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Calendar) OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Calendar) OracleDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32, Calendar)

通过使用所提供的参数初始化新结构的指定日历的年、月、日、小时、分钟、秒和毫秒,来初始化 OracleDateTime 结构的新实例。Initializes a new instance of the OracleDateTime structure using the supplied parameters to initialize the year, month, day, hour, minute, second, and millisecond for the specified calendar of the new structure.

字段

MaxValue MaxValue MaxValue MaxValue

表示 OracleDateTime 结构的最大有效日期值。Represents the maximum valid date value for an OracleDateTime structure.

MinValue MinValue MinValue MinValue

表示 OracleDateTime 结构的最小有效日期值。Represents the minimum valid date value for an OracleDateTime structure.

Null Null Null Null

表示可分配给 Value 结构实例的 OracleDateTime 属性的 null 值。Represents a null value that can be assigned to the Value property of an instance of the OracleDateTime structure.

属性

Day Day Day Day

获取 OracleDateTime 结构的以日表示的值。Gets the value of the OracleDateTime structure as a day.

Hour Hour Hour Hour

获取 OracleDateTime 结构以小时表示的值。Gets the value of the OracleDateTime structure as an hour.

IsNull IsNull IsNull IsNull

获取一个值,该值指示 Value 结构的 OracleDateTime 属性是否为 null。Gets a value indicating whether the Value property of the OracleDateTime structure is null.

Millisecond Millisecond Millisecond Millisecond

获取此实例所表示日期的毫秒部分。Gets the milliseconds component of the date represented by this instance.

Minute Minute Minute Minute

获取 OracleDateTime 结构的以分钟表示的值。Gets the value of the OracleDateTime structure as a minute.

Month Month Month Month

获取 OracleDateTime 结构的以月份表示的值。Gets the value of the OracleDateTime structure as a month.

Second Second Second Second

获取 OracleDateTime 结构的以秒表示的值。Gets the value of the OracleDateTime structure as a second.

Value Value Value Value

获取 OracleDateTime 结构的值。Gets the value of the OracleDateTime structure.

Year Year Year Year

获取 OracleDateTime 结构的以年份表示的值。Gets the value of the OracleDateTime structure as a year.

方法

CompareTo(Object) CompareTo(Object) CompareTo(Object) CompareTo(Object)

将此 OracleDateTime 结构与所提供的对象进行比较,并返回其相对值的指示。Compares this OracleDateTime structure to the supplied object and returns an indication of their relative values.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

将提供的对象参数与 Value 对象的 OracleDateTime 属性进行比较。Compares the supplied object parameter to the Value property of the OracleDateTime object.

Equals(OracleDateTime, OracleDateTime) Equals(OracleDateTime, OracleDateTime) Equals(OracleDateTime, OracleDateTime) Equals(OracleDateTime, OracleDateTime)

对两个 OracleDateTime 结构执行逻辑比较,以确定它们是否相等。Performs a logical comparison of two OracleDateTime structures to determine whether they are equal.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

获取此实例的哈希代码。Gets the hash code for this instance.

GreaterThan(OracleDateTime, OracleDateTime) GreaterThan(OracleDateTime, OracleDateTime) GreaterThan(OracleDateTime, OracleDateTime) GreaterThan(OracleDateTime, OracleDateTime)

OracleDateTime 的两个实例进行比较,以确定第一个实例是否大于第二个实例。Compares two instances of OracleDateTime to determine whether the first is greater than the second.

GreaterThanOrEqual(OracleDateTime, OracleDateTime) GreaterThanOrEqual(OracleDateTime, OracleDateTime) GreaterThanOrEqual(OracleDateTime, OracleDateTime) GreaterThanOrEqual(OracleDateTime, OracleDateTime)

OracleDateTime 的两个实例进行比较,以确定第一个实例是否大于或等于第二个实例。Compares two instances of OracleDateTime to determine whether the first is greater than or equal to the second.

LessThan(OracleDateTime, OracleDateTime) LessThan(OracleDateTime, OracleDateTime) LessThan(OracleDateTime, OracleDateTime) LessThan(OracleDateTime, OracleDateTime)

OracleDateTime 的两个实例进行比较,以确定第一个实例是否小于第二个实例。Compares two instances of OracleDateTime to determine whether the first is less than the second.

LessThanOrEqual(OracleDateTime, OracleDateTime) LessThanOrEqual(OracleDateTime, OracleDateTime) LessThanOrEqual(OracleDateTime, OracleDateTime) LessThanOrEqual(OracleDateTime, OracleDateTime)

OracleDateTime 的两个实例进行比较,以确定第一个实例是否小于或等于第二个实例。Compares two instances of OracleDateTime to determine whether the first is less than or equal to the second.

NotEquals(OracleDateTime, OracleDateTime) NotEquals(OracleDateTime, OracleDateTime) NotEquals(OracleDateTime, OracleDateTime) NotEquals(OracleDateTime, OracleDateTime)

OracleDateTime 的两个实例执行逻辑比较,确定它们是否相等。Performs a logical comparison of two instances of OracleDateTime to determine if they are not equal.

Parse(String) Parse(String) Parse(String) Parse(String)

将日期和时间的指定的 String 表示形式转换为其等效的 OracleDateTime 形式。Converts the specified String representation of a date and time to its OracleDateTime equivalent.

ToString() ToString() ToString() ToString()

将此 OracleDateTime 结构转换为 StringConverts this OracleDateTime structure to a String.

操作员

Equality(OracleDateTime, OracleDateTime) Equality(OracleDateTime, OracleDateTime) Equality(OracleDateTime, OracleDateTime) Equality(OracleDateTime, OracleDateTime)

对两个 OracleDateTime 结构执行逻辑比较,以确定它们是否相等。Performs a logical comparison of two OracleDateTime structures to determine if they are equal.

Explicit(String to OracleDateTime) Explicit(String to OracleDateTime) Explicit(String to OracleDateTime) Explicit(String to OracleDateTime)

String 转换为 OracleDateTime 结构。Converts a String to an OracleDateTime structure.

Explicit(OracleDateTime to DateTime) Explicit(OracleDateTime to DateTime) Explicit(OracleDateTime to DateTime) Explicit(OracleDateTime to DateTime)

OracleDateTime 结构转换为 DateTime 结构。Converts an OracleDateTime structure to a DateTime structure.

GreaterThan(OracleDateTime, OracleDateTime) GreaterThan(OracleDateTime, OracleDateTime) GreaterThan(OracleDateTime, OracleDateTime) GreaterThan(OracleDateTime, OracleDateTime)

OracleDateTime 的两个实例进行比较,以确定第一个实例是否大于第二个实例。Compares two instances of OracleDateTime to determine if the first is greater than the second.

GreaterThanOrEqual(OracleDateTime, OracleDateTime) GreaterThanOrEqual(OracleDateTime, OracleDateTime) GreaterThanOrEqual(OracleDateTime, OracleDateTime) GreaterThanOrEqual(OracleDateTime, OracleDateTime)

OracleDateTime 的两个实例进行比较,以确定第一个实例是否大于或等于第二个实例。Compares two instances of OracleDateTime to determine if the first is greater than or equal to the second.

Inequality(OracleDateTime, OracleDateTime) Inequality(OracleDateTime, OracleDateTime) Inequality(OracleDateTime, OracleDateTime) Inequality(OracleDateTime, OracleDateTime)

OracleDateTime 的两个实例执行逻辑比较,以确定它们是否相等。Performs a logical comparison of two instances of OracleDateTime to determine if they are equal.

LessThan(OracleDateTime, OracleDateTime) LessThan(OracleDateTime, OracleDateTime) LessThan(OracleDateTime, OracleDateTime) LessThan(OracleDateTime, OracleDateTime)

OracleDateTime 的两个实例进行比较,以确定第一个实例是否小于第二个实例。Compares two instances of OracleDateTime to determine if the first is less than the second.

LessThanOrEqual(OracleDateTime, OracleDateTime) LessThanOrEqual(OracleDateTime, OracleDateTime) LessThanOrEqual(OracleDateTime, OracleDateTime) LessThanOrEqual(OracleDateTime, OracleDateTime)

OracleDateTime 的两个实例进行比较,以确定第一个实例是否小于或等于第二个实例。Compares two instances of OracleDateTime to determine if the first is less than or equal to the second.

适用于