Take the 2-minute tour ×
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 1

up vote 2 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 '13 at 6:47
    
this is actually a very good question, thank you! –  Vadim Gremyachev Feb 26 '13 at 7:25
    
Where should I put that <property>? –  Jussi Palo Aug 20 '13 at 13:16
    
It could not be specified via Web Part Tool,but there are another options that allows to provide this property: 1)via SPD 2)Export web part, specify this property and add it on page again 3)during web part provisioning –  Vadim Gremyachev Aug 20 '13 at 13:27
    
To anyone else wondering, with SPD, you should have it as a attribute of the WebControls:CoreResultsWebPart, like this: <WebControls:CoreResultsWebPart DateFormat="DateTime" ... > –  Jussi Palo Aug 20 '13 at 13:32

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.