BindConverter.TryConvertToDateTime Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
TryConvertToDateTime(Object, CultureInfo, DateTime) |
Attempts to convert a value to a DateTime. |
TryConvertToDateTime(Object, CultureInfo, String, DateTime) |
Attempts to convert a value to a DateTime. |
TryConvertToDateTime(Object, CultureInfo, DateTime)
- Source:
- BindConverter.cs
- Source:
- BindConverter.cs
- Source:
- BindConverter.cs
- Source:
- BindConverter.cs
- Source:
- BindConverter.cs
- Source:
- BindConverter.cs
- Source:
- BindConverter.cs
Attempts to convert a value to a DateTime.
public:
static bool TryConvertToDateTime(System::Object ^ obj, System::Globalization::CultureInfo ^ culture, [Runtime::InteropServices::Out] DateTime % value);
public static bool TryConvertToDateTime (object obj, System.Globalization.CultureInfo culture, out DateTime value);
public static bool TryConvertToDateTime (object? obj, System.Globalization.CultureInfo? culture, out DateTime value);
static member TryConvertToDateTime : obj * System.Globalization.CultureInfo * DateTime -> bool
Public Shared Function TryConvertToDateTime (obj As Object, culture As CultureInfo, ByRef value As DateTime) As Boolean
Parameters
- obj
- Object
The object to convert.
- culture
- CultureInfo
The CultureInfo to use for conversion.
- value
- DateTime
The converted value.
Returns
true
if conversion is successful, otherwise false
.
Applies to
TryConvertToDateTime(Object, CultureInfo, String, DateTime)
- Source:
- BindConverter.cs
- Source:
- BindConverter.cs
- Source:
- BindConverter.cs
- Source:
- BindConverter.cs
- Source:
- BindConverter.cs
- Source:
- BindConverter.cs
- Source:
- BindConverter.cs
Attempts to convert a value to a DateTime.
public:
static bool TryConvertToDateTime(System::Object ^ obj, System::Globalization::CultureInfo ^ culture, System::String ^ format, [Runtime::InteropServices::Out] DateTime % value);
public static bool TryConvertToDateTime (object obj, System.Globalization.CultureInfo culture, string format, out DateTime value);
public static bool TryConvertToDateTime (object? obj, System.Globalization.CultureInfo? culture, string format, out DateTime value);
static member TryConvertToDateTime : obj * System.Globalization.CultureInfo * string * DateTime -> bool
Public Shared Function TryConvertToDateTime (obj As Object, culture As CultureInfo, format As String, ByRef value As DateTime) As Boolean
Parameters
- obj
- Object
The object to convert.
- culture
- CultureInfo
The CultureInfo to use for conversion.
- format
- String
The format string to use in conversion.
- value
- DateTime
The converted value.
Returns
true
if conversion is successful, otherwise false
.