How to update Date field in SharePoint list in sharepoint online using CSOM?

Hi SharePointers,

In this blog, we will see the steps involved in updating Date field in SharePoint list in Office 365 using CSOM.

var login = “”;
var password = “your password”

var securePassword = new SecureString();

foreach (char c in password)
SharePointOnlineCredentials onlineCredentials = new SharePointOnlineCredentials(login, securePassword);

ClientContext context = new ClientContext(SiteURL);
context.Credentials = onlineCredentials;
List list = context.Web.Lists.GetByTitle(“startupListList”);
ListItem oListItem = list.GetItemById(1);

oListItem[“StartupDate”] = DateTime.UtcNow;



Happy SharePointing Folks 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *