Returns the value of the NBElement passed in after first converting it to a Nullable<DateTimeOffset> if required using specified conversion.

C# | Visual Basic | Visual C++ | F# |
public static Nullable<DateTimeOffset> ToNullableDateTimeOffset( NBElement value, NBElementDateTimeType convertVia )
Public Shared Function ToNullableDateTimeOffset ( _ value As NBElement, _ convertVia As NBElementDateTimeType _ ) As Nullable(Of DateTimeOffset)
public: static Nullable<DateTimeOffset> ToNullableDateTimeOffset( NBElement^ value, NBElementDateTimeType convertVia )
static member ToNullableDateTimeOffset : value:NBElement * convertVia:NBElementDateTimeType -> Nullable<DateTimeOffset>

- value (NBElement)
- The element whose value is to be converted.
- convertVia (NBElementDateTimeType)
- The type conversion qualifier for element.

The current element's value converted to a Nullable<DateTimeOffset> data type and the specified conversion of the element.

As there are multiple choices when converting from a broker type to a Nullable<DateTimeOffset>, this method allows you greater control over how the convertion is performed. The value is first converted to the convertVia type, and then subsequently converted to a Nullable<DateTimeOffset>.

Exception | Condition |
---|---|
FormatException | Thrown if the value can not be converted to a Nullable<DateTimeOffset> using specified conversion. |