0
votes

I'm building a webpart for SharePoint 2010 in ASP.NET and I would like to know how to get the time in which a ListItem was created at.

With an SPFile I can simply do file.TimeCreated, but ListItem doesn't have that property.

1

1 Answers

1
votes

ListItems store the created and modified datetimes as columns. You can access the created time like so:

DateTime created = (DateTime)myListItem["Created"];