NullableTypes Class Library

NullConvert.ToNullableDateTime Method (DateTime, DateTime)

Converts the specified DateTime value whose null value is simulated using a a conventional DateTime value to an equivalent NullableDateTime.

[Visual Basic]
Overloads Public Shared Function ToNullableDateTime( _
   ByVal x As Date, _
   ByVal conventionalNullValue As Date _
) As NullableDateTime
public static NullableDateTime ToNullableDateTime(
   DateTime x,
   DateTime conventionalNullValue


The DateTime value to convert.
The DateTime value that conventionally represent the null value.

Return Value

Null if x is equals to conventionalNullValue otherwise a NullableDateTime constructed from x.

See Also

NullConvert Class | NullableTypes.HelperFunctions Namespace | NullConvert.ToNullableDateTime Overload List