In order to make SharePoint really functional sometimes little things count. Few weeks ago a customer wanted to display only Date partition of Created value in a list view web part.

Let’s say I want to display a list of “My Active Tasks” on a list web part.

m1

The time partition of the information is irrelevant for this web part. Time is just using space we need to display Title.

SharePoint does not allow you to format the output in a list view web part. Here is a little trick on how to fix that.

    • Create a new calculated column for your list (single line of text)
    • Use the following formula to calculate its value
      =TEXT(Created,"dd mmm yy")

      Use the new column to display in your list. It will look like this one:

      m2

      Paul Grenier wrote a post about similar problem. He used a JQuery to modify Calendar View. It looks like this:

      15 Comments

      1. backtrack Says

        Hi,
        I’d like to have displayed on the calendar view the Creator (Created By) and another field like Location.
        The problem is that is not possible to choose Created By in a calculated column.

        andrew

      2. Toni Says

        @Andrew: Take a look at this solution http://www.endusersharepoint.com/?p=1223, by Paul Grenier… it could be used to solve your problem.

      3. Wouter Says

        I tried this, but I get this message every time:

        The formula contains a syntax error or is not supported. at Microsoft.SharePoint.Library.SPRequestInternalClass.AddField(String bstrUrl, String bstrListName, String bstrSchemaXml, Int32 grfAdd)
        at Microsoft.SharePoint.Library.SPRequest.AddField(String bstrUrl, String bstrListName, String bstrSchemaXml, Int32 grfAdd)

        Any ideas?

      4. Toni Says

        @Wouter: Which regional settings you are using?

      5. Wouter Says

        Toni, I’m using dutch (belgium)

      6. Toni Frankola Says

        @Wouter: I just tried it with Croatian and Dutch (Belgium) regional settings and it works. Maybe something else is missing? Can you save your list as template as send it to me?

      7. Nick Orlich Says

        Can you use this method to get the time to display under the date?

      8. Toni Frankola Says

        @Nick: Sure, try “=TEXT(Created,”hh:mm:ss”)”

      9. K. Ramya Says

        in share point portal i want to diaplay only day & Month.. year not required.

        Pls suggest..

      10. Toni Frankola Says

        @K.Ramya:

        =TEXT(Created,”dd mmm”)

      11. Daniel Walker Says

        If you are in control of the list schema you can set the date format as DateOnly and this will eliminate the time from the views.

        type=”DateTime” format=”DateOnly”

      12. Jo Says

        But what if you make a calculated field with the formula =TEXT(Created,”dd mmm”). Is it still date sortable like it should be?

      13. Toni Frankola Says

        @Jo: Nope, it is text field and it will be sorted as text. I think you cannot have both ways OOTB.

      14. chirantan Says

        This is really very small and effective solution. this solved my problem in seconds.

        Thanks

      15. Ian Says

        When I try this for an all day event using the date format suggested, it sets the day as the day before because the start time is 12:00 AM (I’m guessing). I suppose an if statement would work??

      Leave a Reply