TimeHelpers.ParseIso8601Time Method (String, Boolean)

 

Converts time from the string date format to DateTime.

Namespace:   Microsoft.ConfigurationManagement.Messaging.Framework
Assembly:  Microsoft.ConfigurationManagement.Messaging (in Microsoft.ConfigurationManagement.Messaging.dll)

Syntax

public static DateTime ParseIso8601Time(
    string time,
    bool utc
)
public:
static DateTime ParseIso8601Time(
    String^ time,
    bool utc
)
Public Shared Function ParseIso8601Time (
    time As String,
    utc As Boolean
) As Date

Parameters

  • utc
    Type: System.Boolean

    If true, returns time as UTC; otherwise, returns local time.

Return Value

Type: System.DateTime

DateTime representing the date/time format.

Exceptions

Exception Condition
FormatException

Time was null, empty or improperly formatted

See Also

ParseIso8601Time Overload
TimeHelpers Class
Microsoft.ConfigurationManagement.Messaging.Framework Namespace

Return to top