Calendar.ToDateTime メソッド (Int32, Int32, Int32, Int32, Int32, Int32, Int32)
現在の時代 (年号) の指定した日付と時刻に設定された DateTime を返します。
Overloads Public Overridable Function ToDateTime( _
ByVal year As Integer, _ ByVal month As Integer, _ ByVal day As Integer, _ ByVal hour As Integer, _ ByVal minute As Integer, _ ByVal second As Integer, _ ByVal millisecond As Integer _) As DateTime
[C#]
public virtual DateTime ToDateTime(intyear,intmonth,intday,inthour,intminute,intsecond,intmillisecond);
[C++]
public: virtual DateTime ToDateTime(intyear,intmonth,intday,inthour,intminute,intsecond,intmillisecond);
[JScript]
public function ToDateTime(
year : int,month : int,day : int,hour : int,minute : int,second : int,millisecond : int) : DateTime;
パラメータ
- year
年を表す整数。 - month
月を表す 1 から始まる整数。 - day
日を表す 1 から始まる整数。 - hour
時間を表す 0 ~ 23 の整数。 - minute
分を表す 0 ~ 59 の整数。 - second
秒を表す 0 ~ 59 の整数。 - millisecond
ミリ秒を表す 0 ~ 999 の整数。
戻り値
現在の時代 (年号) の指定した日付と時刻に設定された DateTime 。
例外
例外の種類 | 条件 |
---|---|
ArgumentOutOfRangeException | year が暦でサポートされている範囲外の値です。
または month が暦でサポートされている範囲外の値です。 または day が暦でサポートされている範囲外の値です。 または hour が 0 未満か、または 23 より大きい値です。 または minute が 0 未満か、または 59 より大きい値です。 または second が 0 未満か、または 59 より大きい値です。 または millisecond が 0 未満か、または 999 より大きい値です。 |
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ, .NET Compact Framework - Windows CE .NET
参照
Calendar クラス | Calendar メンバ | System.Globalization 名前空間 | Calendar.ToDateTime オーバーロードの一覧 | System.DateTime | GetMonthsInYear | GetDaysInMonth