Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

We have a calculated column, that results in a date. It's output type is set to DateTime - Date only. When we run the search indexer, it shows up in "crawled properties" as a Text-column, and in the display (in search results) it has a string;# in front of the date-value.

Any suggestions?

share|improve this question
add comment

1 Answer 1

Values for SPFieldCalculated field are stored in the following format:

FieldType;#FieldValue

For calculated column with DateTime type field has the following format:

"datetime;#DateValue"

When field value is rendered (GetFieldValueAsHtml and GetFieldValueAsText) its value is extracted, but it is displayed as raw value when used in search results (crawled property).

share|improve this answer
    
Ok, I get that one, but when the column is defined as DateTime/DateOnly in the field definition, and the formula returns a date, but the search indexer returns it as "string;#DateValue", I would say there is a problem? –  sarcophilus Jan 22 '13 at 20:16
    
This is a nice explanation but it doesn't solve the issue of removing the "string;#" or "datetime;#" from the search result. Is this at all possible using a calculated column? –  skeletank Feb 19 at 17:07
    
Thanks. I suspect the only option here would be to customize search results, I.e. to modify column formatting via xsl.. –  Vadim Gremyachev Feb 19 at 17:20
add comment

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.