1
  1. How to get last modified date of a sharepoint group.
  2. how to get date when a user is added to a sharepoint group.

thanks for your help.

Arvind

4

2 回答 2

3

您可以通过以下代码获取“创建”和“上次修改”日期:

SPList groupInformationList = SPContext.Current.Web.SiteUserInfoList;

SPListItem grpItem = groupInformationList.Items.GetItemById(group.ID); // Pass the ID of group
// OR, SPListItem grpItem = web.SiteUserInfoList.GetItemById(web.SiteGroups["group_name"].ID);

string groupCreationDate = Convert.ToDateTime(grpItem[SPBuiltInFieldId.Created]).ToString("MM/dd/yyyy hh:mm tt"); //Group Creation Date

string groupLastModifiedDate = Convert.ToDateTime(grpItem[SPBuiltInFieldId.Modified]).ToString("MM/dd/yyyy hh:mm tt"); // Group Modification Date
于 2015-06-09T07:46:34.070 回答
0

我不知道有一种开箱即用的方法来做到这一点。SPGroup和SPUserCollection不包含日期。即使查看内容数据库(不受支持),Groups 或 GroupMembership 表也没有日期。

于 2012-08-01T16:04:21.910 回答