다음을 통해 공유


SPUtility.CreateDateTimeFromISO8601DateTimeString Method

Converts the specified ISO 8601 date-time value to a string DateTime format.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Shared Function CreateDateTimeFromISO8601DateTimeString ( _
    ISO8601Time As String _
) As DateTime
'Usage
Dim ISO8601Time As String
Dim returnValue As DateTime

returnValue = SPUtility.CreateDateTimeFromISO8601DateTimeString(ISO8601Time)
public static DateTime CreateDateTimeFromISO8601DateTimeString(
    string ISO8601Time
)

Parameters

  • ISO8601Time
    Type: System.String

    The time, in ISO 8601 format, to convert.

Return Value

Type: System.DateTime
A System.DateTime object that provides the date and time.

Exceptions

Exception Condition
ArgumentNullException

ISO8601Time is a null reference (Nothing in Visual Basic).

Remarks

This method converts the value of the ISO8601Time parameter to System.DateTime format (in YYYY-MM-DDThh:mm:ss).

See Also

Reference

SPUtility Class

SPUtility Members

Microsoft.SharePoint.Utilities Namespace