0

In SharePoint 2013 on-prem I am using display templates to list out sites. I need to show the sites that have had any kind of updates lately.

I am looking for a property, that is a date and time stamp, which is updated each time anything inside a site changes.

Is there any such magical property?

  • LastContentModifiedDate or LastItemModifiedDate? – Eric Alexander Jan 8 '16 at 21:43
  • Hi Eric. I could find no such properties. Where do you find them ? – Ilyas Jan 11 '16 at 15:26
  • 1
    In the search configuration of central administration (in SPO), and I also see them as properties in powershell – Eric Alexander Jan 11 '16 at 15:34
1

to find the recently visited sites, to find top sites etc. We can find it easily by using site.LastItemModifiedDate.

using (SPSite siteCollection = new SPSite("siteurl"))
            {
                SPWebCollection sites = siteCollection.AllWebs;
                foreach (SPWeb site in sites)
                {
                    DateTime dt = site.RegionalSettings.TimeZone.UTCToLocalTime(site.LastItemModifiedDate);
                    Console.WriteLine("site::::{0} Modified time::::{1}", site.Title, dt.ToString());

                }
            }

http://www.mindfiresolutions.com/Find-The-Last-Modified-Date-Of-A-SharePoint-Site-Programmatically-1745.php

or

This PowerShell script is intended to get the "LastModifiedDate" property (amongst others) of all sites in your SharePoint farm.The gathered informations are exported to a csv file, and optionally sent by email with the report as attachment.This script can be useful when auditing SharePoint 2007/2010/2013 Sites: Export the 'Last Modified Date' Property

  • Thank you very much Waqas. I was hoping to use display templates and search only, but this is also very handy. – Ilyas Jan 11 '16 at 16:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.