Share via


Created Property

The Created property of the SPWeb class gets a date and time value that indicates when the site was created.

Property Value

A System.DateTime object that indicates when the site was created according to Coordinated Universal Time (UTC) and not according to system time or time zone settings in Microsoft Windows SharePoint Services.

Remarks

The Created property applies only to sites returned by using one of the GetSubwebsForCurrentUser methods of the SPWeb class and returns a Microsoft.SharePoint.SPException exception if applied to a site collection that is not obtained by using one of these methods.

Example

The following code example displays the name and created date of each subsite within a specified site collection of which the current user is a member.

This example requires using directives (Imports in Visual Basic) for both the Microsoft.SharePoint and Microsoft.SharePoint.Utilities namespaces.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security