Duration(String) Constructor

Construct a duration from a string in ISO 8601 duration format

Definition

Namespace: EWSoftware.PDI
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2023.1.2.0
public Duration(
	string duration
)

Parameters

duration  String
The ISO 8601 formatted duration to parse

Remarks

This parses a string in the form P#Y#M#W#DT#H#M#S to create a duration. '#' indicates a string of one or more digits and the letters represent the years, months, weeks, days, hours, minutes, and seconds. Any of the parts except the leading 'P' and the 'T' time separator can be omitted entirely if not needed.

Exceptions

ArgumentExceptionThis is thrown if the specified duration string is not valid

See Also