Publish-dates in Sitecore without itemextensions

I’ve read everywhere that you cannot get “first publish” and “last publish-date” from Sitecore out of the box and must write an extension for this. While true, I also believe you can use something else. Let me explain.

In my case I wanted to get “last publish-date” on an Article pagetype.
This page is indexed to the Sitecore_web_index when published.
And when being indexed Sitecore.ContentSearch sets __smallupdateddate field.

We can get this field in code from the ContentSearch API from the web_index and, voilà, we have the “last publish-date“.

In Sitecore.ContentSearch.SearchTypes.SearchResultItem we have the two properties

After your search just get the Updated property from your searchResult

result.Updated.ToString("yyyy-MM-dd", CultureInfo.CurrentCulture);

//output example
//2022-11-03



If an item is created and has not been published, it only exists in the master database.
You then edit the page and it might go through some iterations within your organization before approved workflow then publish.
It has now gone +4 days since you created it in master db.
Now if you publish the page/item it will now get a CreatedDate field in the Web database with the date at the publish.
This field will never change. So there you have your “first publish-date“.


This might not catch all scenarios but at least some. Hopefully you get use of it.