0

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 ?

2 Answers 2

1

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"

1
  • it still not working.. it still show 09 November not 09 Nov :( By the way this blog at My Site, that means personal blog. how can i make formatted date 09 Nov by default?
    – gihnih
    Commented Nov 12, 2014 at 1:34
1

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

1
  • Hello sir, right now this personal blog at My Site, i can edit page but only for my blog only, how can i want make to all other user's blog? BTW, at personal blog it dont have content editor.
    – gihnih
    Commented Nov 12, 2014 at 1:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.