SqlDateTime SqlDateTime SqlDateTime SqlDateTime Constructors

定义

重载

SqlDateTime(DateTime) SqlDateTime(DateTime) SqlDateTime(DateTime) SqlDateTime(DateTime)

使用指定的 DateTime 值初始化 SqlDateTime 结构的新实例。Initializes a new instance of the SqlDateTime structure using the specified DateTime value.

SqlDateTime(Int32, Int32) SqlDateTime(Int32, Int32) SqlDateTime(Int32, Int32) SqlDateTime(Int32, Int32)

使用提供的参数初始化 SqlDateTime 结构的新实例。Initializes a new instance of the SqlDateTime structure using the supplied parameters.

SqlDateTime(Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32)

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

SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32)

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

SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Double) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Double) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Double) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Double)

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

SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)

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

SqlDateTime(DateTime) SqlDateTime(DateTime) SqlDateTime(DateTime) SqlDateTime(DateTime)

使用指定的 DateTime 值初始化 SqlDateTime 结构的新实例。Initializes a new instance of the SqlDateTime structure using the specified DateTime value.

public:
 SqlDateTime(DateTime value);
public SqlDateTime (DateTime value);
new System.Data.SqlTypes.SqlDateTime : DateTime -> System.Data.SqlTypes.SqlDateTime
Public Sub New (value As DateTime)

参数

value
DateTime DateTime DateTime DateTime

一个 DateTime 结构。A DateTime structure.

另请参阅

SqlDateTime(Int32, Int32) SqlDateTime(Int32, Int32) SqlDateTime(Int32, Int32) SqlDateTime(Int32, Int32)

使用提供的参数初始化 SqlDateTime 结构的新实例。Initializes a new instance of the SqlDateTime structure using the supplied parameters.

public:
 SqlDateTime(int dayTicks, int timeTicks);
public SqlDateTime (int dayTicks, int timeTicks);
new System.Data.SqlTypes.SqlDateTime : int * int -> System.Data.SqlTypes.SqlDateTime
Public Sub New (dayTicks As Integer, timeTicks As Integer)

参数

dayTicks
Int32 Int32 Int32 Int32

将日期表示为刻度数的整数值。An integer value that represents the date as ticks.

timeTicks
Int32 Int32 Int32 Int32

将时间表示为刻度数的整数值。An integer value that represents the time as ticks.

另请参阅

SqlDateTime(Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32)

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

public:
 SqlDateTime(int year, int month, int day);
public SqlDateTime (int year, int month, int day);
new System.Data.SqlTypes.SqlDateTime : int * int * int -> System.Data.SqlTypes.SqlDateTime
Public Sub New (year As Integer, month As Integer, day As Integer)

参数

year
Int32 Int32 Int32 Int32

一个整数,它表示新 SqlDateTime 结构的年份值。An integer representing the year of the of the new SqlDateTime structure.

month
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的月份值。An integer value representing the month of the new SqlDateTime structure.

day
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的日值。An integer value representing the day number of the new SqlDateTime structure.

另请参阅

SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32)

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

public:
 SqlDateTime(int year, int month, int day, int hour, int minute, int second);
public SqlDateTime (int year, int month, int day, int hour, int minute, int second);
new System.Data.SqlTypes.SqlDateTime : int * int * int * int * int * int -> System.Data.SqlTypes.SqlDateTime
Public Sub New (year As Integer, month As Integer, day As Integer, hour As Integer, minute As Integer, second As Integer)

参数

year
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的年份值。An integer value representing the year of the new SqlDateTime structure.

month
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的月份值。An integer value representing the month of the new SqlDateTime structure.

day
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构中月份的第几天的值。An integer value representing the day of the month of the new SqlDateTime structure.

hour
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的小时值。An integer value representing the hour of the new SqlDateTime structure.

minute
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的分钟值。An integer value representing the minute of the new SqlDateTime structure.

second
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的秒钟值。An integer value representing the second of the new SqlDateTime structure.

另请参阅

SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Double) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Double) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Double) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Double)

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

public:
 SqlDateTime(int year, int month, int day, int hour, int minute, int second, double millisecond);
public SqlDateTime (int year, int month, int day, int hour, int minute, int second, double millisecond);
new System.Data.SqlTypes.SqlDateTime : int * int * int * int * int * int * double -> System.Data.SqlTypes.SqlDateTime
Public Sub New (year As Integer, month As Integer, day As Integer, hour As Integer, minute As Integer, second As Integer, millisecond As Double)

参数

year
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的年份值。An integer value representing the year of the new SqlDateTime structure.

month
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的月份值。An integer value representing the month of the new SqlDateTime structure.

day
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构中月份的第几天的值。An integer value representing the day of the month of the new SqlDateTime structure.

hour
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的小时值。An integer value representing the hour of the new SqlDateTime structure.

minute
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的分钟值。An integer value representing the minute of the new SqlDateTime structure.

second
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的秒钟值。An integer value representing the second of the new SqlDateTime structure.

millisecond
Double Double Double Double

一个双精度型值,表示新 SqlDateTime 结构的毫秒值。An double value representing the millisecond of the new SqlDateTime structure.

另请参阅

SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32) SqlDateTime(Int32, Int32, Int32, Int32, Int32, Int32, Int32)

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

public:
 SqlDateTime(int year, int month, int day, int hour, int minute, int second, int bilisecond);
public SqlDateTime (int year, int month, int day, int hour, int minute, int second, int bilisecond);
new System.Data.SqlTypes.SqlDateTime : int * int * int * int * int * int * int -> System.Data.SqlTypes.SqlDateTime
Public Sub New (year As Integer, month As Integer, day As Integer, hour As Integer, minute As Integer, second As Integer, bilisecond As Integer)

参数

year
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的年份值。An integer value representing the year of the new SqlDateTime structure.

month
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的月份值。An integer value representing the month of the new SqlDateTime structure.

day
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的日值。An integer value representing the day of the new SqlDateTime structure.

hour
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的小时值。An integer value representing the hour of the new SqlDateTime structure.

minute
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的分钟值。An integer value representing the minute of the new SqlDateTime structure.

second
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的秒钟值。An integer value representing the second of the new SqlDateTime structure.

bilisecond
Int32 Int32 Int32 Int32

一个整数值,它表示新 SqlDateTime 结构的毫秒(千分之一毫秒)。An integer value representing the microsecond (thousandths of a millisecond) of the new SqlDateTime structure.

另请参阅

适用于