Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I get the sitecore item Published Date?

Ho do I get the published date of a sitecore item? There are fields like _______created and ___updated but couldn't find anything for published date. I tried the following:

Sitecore.Context.Item.Publishing.PublishDate

But this only gives me date if I explicitly set it from the Content Editor. Basically I just want to print out the date the item was published.

Thanks.

like image 213
Sudeep Avatar asked Jul 16 '10 01:07

Sudeep


2 Answers

Unfortunately you can't get a published date. We have to implement a custom way to track when items are published.

like image 79
Michael Edwards Avatar answered Oct 18 '22 21:10

Michael Edwards


Try '__publish' and '__unpublish' for Publish Date and Unpublished Date accordingly.

like image 23
Yan Sklyarenko Avatar answered Oct 18 '22 20:10

Yan Sklyarenko