Returns the date and time converted to a DateTime value.
[Visual Basic] Overrides Public 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 DateTime [C#] public override DateTime ToDateTime( int year, int month, int day, int hour, int minute, int second, int millisecond, int era ); [C++] public: override DateTime ToDateTime( int year, int month, int day, int hour, int minute, int second, int millisecond, int era ); [JScript] public override function ToDateTime( year : int, month : int, day : int, hour : int, minute : int, second : int, millisecond : int, era : int ) : DateTime;
Returns the constructed DateTime instance for the specified time.
Exception Type | Condition |
---|---|
ArgumentException | if provided with an invalid era value |
GregorianCalendar Class | GregorianCalendar Members | System.Globalization Namespace