Gets or sets a date and time value that indicates when the site was created. (Read-only in sandboxed solutions.)
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
'Declaration Public Property Created As DateTime Get Set 'Usage Dim instance As SPWeb Dim value As DateTime value = instance.Created instance.Created = value
Property valueType: System.DateTime
A System.DateTime object that indicates when the site was created, specified in Coordinated Universal Time (UTC) format and not in system time or time zone settings in Microsoft SharePoint Foundation.
The following code example displays the name and creation date of each subsite within a specified site collection of which the current user is a member.
Dim siteCollection As New SPSite("http://Server_Name/sites/Site_Name") Dim webSites As SPWebCollection = siteCollection.OpenWeb().GetSubwebsForCurrentUser() For i As Integer = 0 To webSites.Count - 1 Response.Write((SPEncode.HtmlEncode(webSites(i).Name) + " :: " + webSites(i).Created.ToString() + "<BR>")) webSites(i).Dispose() Next
Certain objects implement the IDisposable interface, and you must avoid retaining these objects in memory after they are no longer needed. For information about good coding practices, see Disposing Objects.