I am trying to modify the date format displayed in a custom template using the field. What I want to display is this:
This page was last modified on 29 Jan 2010 by Joel Spolsky
(where the user name links to their profile).
I found some good examples here on http://mindsharpblogs.com/aaron/archive/2008/02/08/4283.aspx which helped me get the custom template set up. And I looked through the class members on the MSDN documentation. But I cannot figure out how to modify the date format.
Is there any way to pass a date format string such as "d MMM yyyy" to the FieldValue to use for rendering?
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.
<SharePoint:CreatedModifiedInfo ControlMode="Display" runat="server">
<CustomTemplate>
This page was last modified on
<SharePoint:FieldValue FieldName="Modified" runat="server" ControlMode="Display" DisableInputFieldLabel="true"/>
by
<SharePoint:FormField FieldName="Author" runat="server" ControlMode="Display" DisableInputFieldLabel="true" />
</CustomTemplate>
</SharePoint:CreatedModifiedInfo>