DurationTo String Method
Convert the duration instance to its ISO 8601 string form
Definition
Namespace: EWSoftware.PDI
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2025.1.9.0
Returns the duration in ISO 8601 format
Assembly: EWSoftware.PDI (in EWSoftware.PDI.dll) Version: 2025.1.9.0
C#
public override string ToString()VB
Public Overrides Function ToString As StringC++
public:
virtual String^ ToString() overrideF#
abstract ToString : unit -> string
override ToString : unit -> string Return Value
StringReturns the duration in ISO 8601 format
Remarks
The conversion to string breaks the duration down by largest to smallest unit (years down to
seconds). As such, the string returned may not match the string it was parsed from if a unit in the
input string exceeds a unit of time used when converting it back to a string (i.e. PT24H will be
returned as P1D, P7W will be returned as P1M2W5D if a month is defined as 30 days). The overloaded
version can be used to convert to a string with a maximum unit of time represented.