Date format in Search Core Result web part
Hi, I have two Site Columns PublishedDate and GlobalTitle. They have datetime and string type. These site columns are added to the Custom List. I need to show these columns in Search Core Result web part when item is searched. Because of this reason I created them as Site columns and Mapped with crawl property in SSP. After doing full crawl I can access both site columns in Search core Result. GlobalTitle is displayed properly but problem is with PublishedDate. It shows System.DateTime[] only. Can any one help me to show this in any of the date format but not like System.DateTime[]. Many Thanks in advance Chirantan
September 16th, 2010 4:28pm

Hi, In your issue, my suggestion is to change the System.DateTime [] to DateTime.Now.ToString (#yyyy-MM-dd#). However there are many ways to change the date format, here is a link that explained the System.DateTime; you can follow it for some details: http://www1.cs.columbia.edu/~lok/csharp/refdocs/System/types/DateTime.html. The other link expresses the use of System.DateTime in the SQL server, it may also do good to you: http://www.codeproject.com/Articles/105554/Serializing-System-DateTime-for-SQL-Server.aspx. Hope this would help!
Free Windows Admin Tool Kit Click here and download it now
September 29th, 2010 12:29pm

Hi Leoyi, I have the similar issue and I doubt that these links are talking about the same thing. Issue exists in XSLT when we render core search results. There is no customization involved. We are talking about OOB stuff here. Nitin Sablok - Posting is provided "AS IS" with no warranties, and confers no rights.
January 22nd, 2011 7:16pm

Hi Leoyi, I have the similar issue and I doubt that these links are talking about the same thing. Issue exists in XSLT when we render core search results. There is no customization involved. We are talking about OOB stuff here. Nitin Sablok - Posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
January 22nd, 2011 7:16pm

Guys, I have the same problem. I have one called ReportCreatedDate in my custom list. If I just add this column to a crawled property, it crawls fine but it only shows the date part although the column is datetime. If I add other mappings to the Metadata property similar to the OOB Created(Date & Time), I get System.Date[] in the result. Looks like internally SharePoint is trying to do ToString() operation on a System.Date[] type field. Is this a bug in MOSS?Nitin Sablok - Posting is provided "AS IS" with no warranties, and confers no rights.
January 22nd, 2011 8:34pm

Guys, I have the same problem. I have one called ReportCreatedDate in my custom list. If I just add this column to a crawled property, it crawls fine but it only shows the date part although the column is datetime. If I add other mappings to the Metadata property similar to the OOB Created(Date & Time), I get System.Date[] in the result. Looks like internally SharePoint is trying to do ToString() operation on a System.Date[] type field. Is this a bug in MOSS?Nitin Sablok - Posting is provided "AS IS" with no warranties, and confers no rights.
Free Windows Admin Tool Kit Click here and download it now
January 22nd, 2011 8:34pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics