Tell me more ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

after few hours I still dont know how to do the following: Customer wants to display last 5 documents with search engine. Iam able to write the query and also order the documents by modified date. However I am not able to fetch the modified date to search results. I can take the write element property however client wants also the time.

share|improve this question

1 Answer

up vote 1 down vote accepted

DateFormat property is used for specifying the date and time formatting for the CoreResultsWebPart web part.

By default search results in the web part are displayed in DateOnly format.

Usage

This property could not be specified using web part editor, so please consider another options for specifying it value, for example SharePoint Designer.

For example, after specifying this property value to DateTime:

<property name="DateFormat" type="Microsoft.SharePoint.Utilities.SPDateFormat, Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c">DateTime</property> 

write property would be displayed like this:

<write>2/12/2013 12:58 PM</write>
share|improve this answer
thank you! this is awesome! – Ivan Feb 26 at 6:47
this is actually a very good question, thank you! – Vadim Gremyachev Feb 26 at 7:25

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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