Question

enter image description here

This personal blog at mysite. For this issues i cannot add customs css right? what i think right now, i want change date formatting become "09 Nov" not "09 November", is that possible ?

Was it helpful?

Solution

Go to the Posts list of your blog -> list settings -> click on "Created" column, there you schould be able to change the showing date format to "Standard"

OTHER TIPS

Since in SharePoint 2013 Client Side Rendering is a default rendering mode, i would recommend the following approach to set PublishingDate field format. The solution is to override the format of PublishingDate field before rendering the post as demonstrated below:

JavaScript template

SPClientTemplates.TemplateManager.RegisterTemplateOverrides({
  ListTemplateType: 301,
  OnPreRender: function(ctx) { 
      var rows = ctx.ListData.Row;
      for (var i=0;i<rows.length;i++)
      {
         var monthString = rows[i]["PublishedDate.MonthDayOnly"];
         var monthParts = monthString.split(" ");
         monthParts[0] = monthParts[0].substring(0,3);
         rows[i]["PublishedDate.MonthDayOnly"] = monthParts.join(" "); 
      }
  }
});

How to apply changes

Probably the easiest way would to insert the specified code into the page using Content Editor or Script Editor web parts.

  1. Open the page in Edit mode
  2. Add Script Editor web part and insert the provided code by enclosing it using script tag
  3. Save the changes

Result enter image description here

Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top