NBElementConvert ToTimeSpan Method (NBElement, NBElementTimeSpanType)IBM Integration Bus
Returns the value of the NBElement passed in as a TimeSpan after first converting it to the convertVia type.

Namespace: IBM.Broker.Plugin
Assembly: IBM.Broker.Plugin (in IBM.Broker.Plugin.dll) Version: 9.0.0.0
Syntax

public static TimeSpan ToTimeSpan(
	NBElement value,
	NBElementTimeSpanType convertVia
)

Return Value

Type: OnlineTimeSpan
The current element's value converted to a TimeSpan data type using the specified conversion of the element.
Exceptions

ExceptionCondition
OnlineSystem FormatExceptionThrown if the value can not be converted to a TimeSpan with the given conversion.
Remarks

As there are multiple choices when converting from a broker type to a TimeSpan, 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 TimeSpan.
See Also