LiquidTechnologies.XmlObjects Namespace / LxDuration Structure / ToTimeSpan Method

In This Topic
    ToTimeSpan Method
    In This Topic
    Gets the duration as a TimeSpan (NOTE: throws if the duration contains months or years)
    Syntax
    'Declaration
     
    
    Public Function ToTimeSpan() As System.TimeSpan
    public System.TimeSpan ToTimeSpan()

    Return Value

    A timespan representing this xsd:duration
    Exceptions
    ExceptionDescription
    If this xsd:duration contains months or years, as there is no unambigious way to convert a month/year to days.
    Requirements

    Target Platforms: Windows 10, Windows 8, Windows 7, Windows Vista, Windows Server 2016, Windows Server 2012, Windows Server 2008. Please ensure you have the latest Service Pack for your operating system installed.

    See Also