Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Ali Sheikh Taheri 470 posts 1647 karma points c-trib
    Aug 16, 2010 @ 14:27
    Ali Sheikh Taheri
    0

    xslt how to convert month number to month name?

    xslt how to convert month number to month name?

    ex: 1 to januray and so on?!!

    Any Idea on this?

    Thanks

  • Chriztian Steinmeier 2726 posts 8320 karma points MVP 4x admin c-trib
    Aug 16, 2010 @ 14:48
    Chriztian Steinmeier
    1

    Hi Ali,

    Have a look at the funtions in EXSLT - there's a function called monthname() - e.g.:

    <xsl:value-of select="Exslt.ExsltDatesAndTimes:monthname($currentPage/@createDate)" />

    /Chriztian 

  • Ali Sheikh Taheri 470 posts 1647 karma points c-trib
    Aug 16, 2010 @ 14:53
    Ali Sheikh Taheri
    0

    Great solution. simple and straight forward.

    Thanks a lot Chriztian.

    Cheers

  • Ali Sheikh Taheri 470 posts 1647 karma points c-trib
    Aug 16, 2010 @ 14:55
    Ali Sheikh Taheri
    1

    az I had my node name as month like 7.

    I have used this as it might be useful for others.

    <xsl:value-of select="Exslt.ExsltDatesAndTimes:monthname(concat('1900/',@nodeName,'/1'))"/>

    Ali

  • sun 403 posts 395 karma points
    Aug 16, 2010 @ 15:14
    sun
    0

    if you have a date, you can use following:

    <xsl:value-of select="umbraco.library:FormatDateTime(date,'MMMM')"/>

    all right?

  • Ali Sheikh Taheri 470 posts 1647 karma points c-trib
    Aug 16, 2010 @ 15:15
    Ali Sheikh Taheri
    0

    Sun,

    Basically your approach works the same way as the other one. 

    But thanks anyway.

    Cheer

    Ali

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies