I have SharePoint list hosted in SharePoint online.
I need to change the display format for the modified filed to standard from friendly using CSOM code. I am able to do it through UI.
Below is the code snippet I used to change:
Field f = splist.Fields.GetByTitle("Modified"); FieldDateTime field = ctx.CastTo <FieldDateTime> (f); // FieldDateTime dateTime = field.DisplayFormat = DateTimeFieldFormatType.DateTime; field.Update(); splist.Update(); ctx.ExecuteQuery();
Any help appreciated.