ToDateTime()

Convert::ToDateTime(bool) method

Conversion is not supported. Always throws InvalidCastException.

static DateTime System::Convert::ToDateTime(bool value)

Convert::ToDateTime(uint8_t) method

Conversion is not supported. Always throws InvalidCastException.

static DateTime System::Convert::ToDateTime(uint8_t value)

Convert::ToDateTime(int8_t) method

Conversion is not supported. Always throws InvalidCastException.

static DateTime System::Convert::ToDateTime(int8_t value)

Convert::ToDateTime(uint16_t) method

Conversion is not supported. Always throws InvalidCastException.

static DateTime System::Convert::ToDateTime(uint16_t value)

Convert::ToDateTime(int16_t) method

Conversion is not supported. Always throws InvalidCastException.

static DateTime System::Convert::ToDateTime(int16_t value)

Convert::ToDateTime(uint32_t) method

Conversion is not supported. Always throws InvalidCastException.

static DateTime System::Convert::ToDateTime(uint32_t value)

Convert::ToDateTime(int32_t) method

Conversion is not supported. Always throws InvalidCastException.

static DateTime System::Convert::ToDateTime(int32_t value)

Convert::ToDateTime(uint64_t) method

Conversion is not supported. Always throws InvalidCastException.

static DateTime System::Convert::ToDateTime(uint64_t value)

Convert::ToDateTime(int64_t) method

Conversion is not supported. Always throws InvalidCastException.

static DateTime System::Convert::ToDateTime(int64_t value)

Convert::ToDateTime(float) method

Conversion is not supported. Always throws InvalidCastException.

static DateTime System::Convert::ToDateTime(float value)

Convert::ToDateTime(double) method

Conversion is not supported. Always throws InvalidCastException.

static DateTime System::Convert::ToDateTime(double value)

Convert::ToDateTime(const Decimal&) method

Conversion is not supported. Always throws InvalidCastException.

static DateTime System::Convert::ToDateTime(const Decimal &value)

Convert::ToDateTime(char_t) method

Conversion is not supported. Always throws InvalidCastException.

static DateTime System::Convert::ToDateTime(char_t value)

Convert::ToDateTime(DateTime) method

Returns the specified date and time.

static constexpr DateTime System::Convert::ToDateTime(DateTime value)

Convert::ToDateTime(const String&) method

Converts the specified string to an instance of DateTime class.

static DateTime System::Convert::ToDateTime(const String &value)

Arguments

ParameterTypeDescription
valueconst String&The string to convert

Return Value

An instance of DateTime class representing the date and time information represented by the specified string

Convert::ToDateTime(const String&, const SharedPtr<IFormatProvider>&) method

Converts the specified string to an instance of DateTime class using the provided formatting information.

static DateTime System::Convert::ToDateTime(const String &value, const SharedPtr<IFormatProvider> &fp)

Arguments

ParameterTypeDescription
valueconst String&The string to convert
fpconst SharedPtr<IFormatProvider>&A pointer to an object that contains the string format information

Return Value

An instance of DateTime class representing the date and time information represented by the specified string

Convert::ToDateTime(const String&, const SharedPtr<Globalization::CultureInfo>&) method

static DateTime System::Convert::ToDateTime(const String &value, const SharedPtr<Globalization::CultureInfo> &culture)

Convert::ToDateTime(const String&, const SharedPtr<Globalization::DateTimeFormatInfo>&) method

static DateTime System::Convert::ToDateTime(const String &value, const SharedPtr<Globalization::DateTimeFormatInfo> &dtfi)

Convert::ToDateTime(const String&, std::nullptr_t) method

static DateTime System::Convert::ToDateTime(const String &value, std::nullptr_t)

Convert::ToDateTime(const SharedPtr<Object>&, const SharedPtr<IFormatProvider>&) method

Converts the specified boxed value to equivalent DateTime value.

static DateTime System::Convert::ToDateTime(const SharedPtr<Object> &obj, const SharedPtr<IFormatProvider> &provider=nullptr)

Arguments

ParameterTypeDescription
objconst SharedPtr<Object>&The shared pointer to the object boxing the value to convert
providerconst SharedPtr<IFormatProvider>&The string format to be used if the type of the boxed value is String

Return Value

A DateTime value equivalent to the specified boxed value

See Also