Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 601241
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:41:35+00:00 2026-05-13T16:41:35+00:00

I am trying to modify the date format displayed in a custom template using

  • 0

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>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T16:41:36+00:00Added an answer on May 13, 2026 at 4:41 pm

    I found a slightly different solution the problem. I’m not 100% happy with it, but it’s pretty simple. This was based on a solution I read here: http://panvega.wordpress.com/2009/03/16/masterpagepagelayout-format-date-field/

    You create a custom column on the library of type “Calculated” and format the date however you want. In my case that meant:

    =TEXT(Modified,"d MMM yyyy")
    

    Then in the page layout I just reference this field and the formatting is already done:

    <SharePointWebControls:CalculatedField ID="CalculatedField" FieldName="Display Date" runat="server" />
    

    It’s not as elegant a solution as I was looking for mostly because it requires adding a custom column on every page library. But it requires very little code.

    I’m still open to a better solution. It’s seems strange to have to write a whole web control just to format a date, but it seems that might be the only other better alternative.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 416k
  • Answers 416k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer There actually is something wrong with dot notation. It can… May 15, 2026 at 9:30 am
  • Editorial Team
    Editorial Team added an answer This should do it: string s = "joe ($3,004.50)"; s… May 15, 2026 at 9:30 am
  • Editorial Team
    Editorial Team added an answer Don't send local strings into the database and ask the… May 15, 2026 at 9:30 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.