Updating Date Time column in SharePoint 2010/2013 from C#

Updating Date Time column in SharePoint 2010/2013 from C#.

DateTime.Now.ToString(“yyyy-MM-ddTHH:mm:ssZ”);

spItem["MyDateTimeColumn"] = Microsoft.SharePoint.Utilities.SPUtility.CreateISO8601DateTimeFromSystemDateTime(DateTime.Now);
//How to handle server time vs website time.
spweb.RegionalSettings.TimeZone.UTCToLocalTime(DateTime.UtcNow);

Comments

Popular posts from this blog

Dataverse D365 REST Web Api using client secret From Postman or Power Automate desktop (PAD) .

Chrome Extension to auto refresh Power BI report.

How to call SharePoint online rest APIs using postman?