Calendar for WinForms | ComponentOne
C1.Globalization Namespace / JapaneseCalendarEx Class / ToDateTime Method / ToDateTime(Int32,Int32,Int32,Int32,Int32,Int32,Int32,Int32) Method
An integer that represents the year.
An integer from 1 to 12 that represents the month.
An integer from 1 to 31 that represents the day.
An integer from 0 to 23 that represents the hour.
An integer from 0 to 59 that represents the minute.
An integer from 0 to 59 that represents the second.
An integer from 0 to 999 that represents the millisecond.
An integer that represents the era.

In This Topic
    ToDateTime(Int32,Int32,Int32,Int32,Int32,Int32,Int32,Int32) Method
    In This Topic
    Returns a System.DateTime that is set to the specified date and time in the specified era.
    Syntax
    'Declaration
     
    
    Public Overloads Overrides 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, _
       ByVal era As Integer _
    ) As Date
    public override DateTime ToDateTime( 
       int year,
       int month,
       int day,
       int hour,
       int minute,
       int second,
       int millisecond,
       int era
    )

    Parameters

    year
    An integer that represents the year.
    month
    An integer from 1 to 12 that represents the month.
    day
    An integer from 1 to 31 that represents the day.
    hour
    An integer from 0 to 23 that represents the hour.
    minute
    An integer from 0 to 59 that represents the minute.
    second
    An integer from 0 to 59 that represents the second.
    millisecond
    An integer from 0 to 999 that represents the millisecond.
    era
    An integer that represents the era.

    Return Value

    The System.DateTime that is set to the specified date and time in the current era.
    Exceptions
    ExceptionDescription
    year is outside the range supported by the calendar.-or- month is outside the range supported by the calendar. -or- day is outside the range supported by the calendar.-or- hour is less than zero or greater than 23. -or- minute is less than zero or greater than 59.-or- second is less than zero or greater than 59. -or- millisecond is less than zero or greater than 999.-or- era is outside the range supported by the calendar.
    See Also