I want to find the sitecollection created and last content modified date in Sharepoint 2010, found a SPSite property for last content modified date however could not find any clue to find the created date. Is there a way to find the sitecollection created date?
The SiteData web service shows it as part of the WebMetaData. If you wanted strictly content only, I think you'd have to look at all the lists and libraries in the site and get the data on a per list/library level and get the most recent modification.
For MOSS2007, we ended up using the created date of the Site Template Gallery because the created of the SPSite could potentially change (it was years ago, but I think restoring a site from backup would do it). As we're upgrading to SP2010, we are using the Solution Gallery, since the Site Template Gallery is gone. The code (minus all the error handling) looks like this:
site.RootWeb.Lists["Site Template Gallery"].Created
Also, be careful about last content modified date. We found that sometimes a system process would go through and update the last modified date of sites, even though nothing has changed. If you need to be sure, you can use SPSiteDataQuery to check all the contents of the site.