Skip to content

Instantly share code, notes, and snippets.

@DaveGoosem
Created June 13, 2013 12:12
Show Gist options
  • Save DaveGoosem/5773203 to your computer and use it in GitHub Desktop.
Save DaveGoosem/5773203 to your computer and use it in GitHub Desktop.
Get Sitecore item 'last published' value AKA 'updated'
public Item item;
public String PublishDate()
{
DateTime postDate = Context.Item.Statistics.Updated;
return postDate != null ? postDate.ToString("MMMM dd yyyy H:mm:ss tt") : String.Empty;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment