MarkLogic XCC/.Net Library |

# Duration Constructor (String)

Construct a duration object initialized from the given string in the format of a serialized xs:duration item. Examples: P2Y3M141DT12H46M12.34S, -P92M, -P32M2DT0.2S.

[Visual Basic]
Overloads Public Sub New( _
ByVal duration As String _
)
[C#]
public Duration(
string duration
);

#### Parameters

duration
  An xs:duration value as defined by XML Schema Part 2: Datatypes

#### See Also

Duration Class | Marklogic.Xcc.Types Namespace | Duration Constructor Overload List