Note that there are some explanatory texts on larger screens.

plurals
  1. POModify Date Format for "last modified" in SharePoint:CreatedModifiedInfo
    primarykey
    data
    text
    <p>I am trying to modify the date format displayed in a custom template using the field. What I want to display is this:</p> <blockquote> <p>This page was last modified on 29 Jan 2010 by Joel Spolsky</p> </blockquote> <p>(where the user name links to their profile).</p> <p>I found some good examples here on <a href="http://mindsharpblogs.com/aaron/archive/2008/02/08/4283.aspx" rel="nofollow noreferrer">http://mindsharpblogs.com/aaron/archive/2008/02/08/4283.aspx</a> which helped me get the custom template set up. And I looked through the class members on the <a href="http://msdn.microsoft.com/en-us/library/microsoft.sharepoint.webcontrols.createdmodifiedinfo_members.aspx" rel="nofollow noreferrer">MSDN documentation</a>. But I cannot figure out how to modify the date format.</p> <p>Is there any way to pass a date format string such as "<strong>d MMM yyyy</strong>" to the FieldValue to use for rendering?</p> <p>This is my current code which works except the date format comes in as 29/01/2010 19:22 which isn't as user-friendly. </p> <pre><code>&lt;SharePoint:CreatedModifiedInfo ControlMode="Display" runat="server"&gt; &lt;CustomTemplate&gt; This page was last modified on &lt;SharePoint:FieldValue FieldName="Modified" runat="server" ControlMode="Display" DisableInputFieldLabel="true"/&gt; by &lt;SharePoint:FormField FieldName="Author" runat="server" ControlMode="Display" DisableInputFieldLabel="true" /&gt; &lt;/CustomTemplate&gt; &lt;/SharePoint:CreatedModifiedInfo&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload