Sudeep
Sudeep

Reputation: 349

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.

Upvotes: 8

Views: 5164

Answers (2)

Michael Edwards
Michael Edwards

Reputation: 6528

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

Upvotes: 6

Yan Sklyarenko
Yan Sklyarenko

Reputation: 32280

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

Upvotes: 3

Related Questions