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);
spweb.RegionalSettings.TimeZone.UTCToLocalTime(DateTime.UtcNow);
Comments
Post a Comment