Stump the Panel » Site Managers and Site Collection Managers

Convert date format XSLT

(6 posts)
  • Started 2 months ago by jaxkookie
  • Latest reply from GeorgeWNYC
  1. jaxkookie
    Member

    I have a question related to this post http://www.endusersharepoint.com/?p=1164 on the formating of the Date on the dataview XSLT. In a view I created I am grouping by Month/Year and sort decending. The header displays something like "2009.03". This has been the only way I was able to group by month/year and sort it correctly.
    Can this date or fieldvalue be converted to display "March 2009"?
    What would I need to change in my calculated field to support this output?
    What is the XSLT to obtain this?

    Posted 2 months ago #
  2. You probably want to look at the DDWRT namespace functions. I wrote something on my old blog about it--the references should still be current:

    http://autosponge.spaces.live.com/blog/cns!D7F85948C20F0293!378.entry

    Posted 2 months ago #
  3. jaxkookie
    Member

    This was very helpful, but I was unsuccessly in finding a way to convert numerical year/month into alphanumerica year/month. Maybe I am not familiar enough with the formatting part.

    Posted 2 months ago #
  4. <xsl:value-of select="ddwrt:FormatDateTime(string(@Created) ,1033 ,'MMMM')" />
    <xsl:value-of select="ddwrt:FormatDateTime(string(@Created) ,1033 ,'YYYY')" />
    Posted 2 months ago #
  5. jaxkookie
    Member

    Well I feel stupid now. That was simple, did not even occur to me. Thanks a million!

    Posted 2 months ago #
  6. GeorgeWNYC
    Member

    Don't feel bad, you're not alone. This product needs more <ahem> simple answers.

    Posted 2 months ago #

RSS feed for this topic

Reply

You must log in to post.