Share via


CreateISO8601DateTimeFromSystemDateTime Method

The CreateISO8601DateTimeFromSystemDateTime method of the SPUtility class converts a system DateTime value to ISO8601 DateTime format (yyyy-mm-ddThh:mm:ssZ).

Parameters

dtValue   A System.DateTime object that represents the system DateTime value in the form mm/dd/yyyy hh:mm:ss AM or PM.

Return Value

A string that contains the date and time in ISO8601 DateTime format.

Remarks

The CreateISO8601DateTimeFromSystemDateTime method converts, for example, "6/16/2003 6:37:44 PM" to "2003-06-16T18:37:44Z".

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security