Pulled this from the web and it seems to work for the most part. However...
I have a calendar on a subsite. I want to display the events on the home page of the top level site and customize the appearance. Added a CQWP, exported it, modified it, etc. The data for each event is displaying nicely, however, grouping is not.
- Created a calculated column (NiceDate) to sort the groups by date. This is a DateTime field (=TEXT([Start Time],"yyyy-mm-dd"))
- Exported/modified webpart to include 'NiceDate' in the AdditionalGroupAndSortFields' and 'CommonViewFields'.
- Grouped by NiceDate in web part properties.
- Created a new header .xsl template (DateHeader) to format the date.
Here is the code for the DateHeader formatting:
<xsl:with-param name="GroupName" select="ddwrt:FormatDateTime(string(@*[name()=$Group]), 1033, 'dddd, MMM d yyyy')" />
When everything is put together the CQWP displays the header as literally "(Blank)" for each group. If I replace this select with one of the existing templates (select="@*[name()=$Group]") it displays the NiceDate as follows (String;#yyyy-mm-dd) which I do not want.
Long post, I know. But I've been banging my head against the wall trying to get this sorted out. I don't know where the problem is. Is it the calculated column formatted as a string? How would I fix this?