I'm using an SPGridView to display search results (SP2010) and I would like to modify the way datetime column is displayed through the column menu.

Schema are more meaningful than long speeches so I'm going to be straightforward. I have this :

enter image description here

I would like to have this:

enter image description here

You can see that there is no "time" anymore and only the date is displayed. Thank you very much.


You can achieve by using calculated column.

What you can do is create a new "Calculated" column and then use formula =TEXT(Modified,"dd/MM/yyyy"). Select "Date and Time" in data type returned and use "Date only" in format.

This will solve your purpose.

  • Thank you for answering my question. This is actually the first thing I've tried. Unfortunatly and for dark reasons the values displayed in the UI Menu when selecting the filter button are formated as follow : datetime;#2016-02-10T07:44:31Z. As you can guess it's worse. – ameliapond Feb 24 '16 at 13:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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