다음을 통해 공유


SPUtility.CreateSystemDateTimeFromXmlDataDateTimeFormat Method

Converts the date and time value from ISO8601 DateTime format (YYYY-MM-DDTHH:MM:SSZ) to system DateTime format (mm/dd/yyyy hh:mm:ss AM or PM).

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 CreateSystemDateTimeFromXmlDataDateTimeFormat ( _
    strDT As String _
) As DateTime
'Usage
Dim strDT As String
Dim returnValue As DateTime

returnValue = SPUtility.CreateSystemDateTimeFromXmlDataDateTimeFormat(strDT)
public static DateTime CreateSystemDateTimeFromXmlDataDateTimeFormat(
    string strDT
)

Parameters

  • strDT
    Type: System.String

    A string that contains the date and time in XMLDATA DateTime format (YYYY-MM-DDTHH:MM:SSZ).

Return Value

Type: System.DateTime
A System.DateTime object that represents the date and time in system DateTime format.

Remarks

The CreateSystemDateTimeFromXmlDataDateTimeFormat converts, for example, "2003-06-20T16:42:08Z" to "6/20/2003 4:42:08 PM".

See Also

Reference

SPUtility Class

SPUtility Members

Microsoft.SharePoint.Utilities Namespace