Copied to clipboard

Flag this post as spam?

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


  • Touhid 97 posts 117 karma points
    Nov 01, 2010 @ 13:13
    Touhid
    0

    display date formate

    dear,

    im very new in umbraco. i want to display a date in a page. look like same as-

    Format:  Monday, November 01, 2010

    so, how can i do this?

    pls, help me any one.

    regard,

    touhid,dhaka,bangladesh.

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Nov 01, 2010 @ 13:18
    Steen Tøttrup
    0

     

    Is this done from a xslt snippet? Or from a UserControl or where do you have the data?

     

  • Touhid 97 posts 117 karma points
    Nov 01, 2010 @ 13:23
    Touhid
    0

    dear,

    thnks for rply. but i have a poor knowledge about umbraco. so, pls help me in details. i know xslt but dont know snippet.

     

    touhid

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Nov 01, 2010 @ 13:28
    Steen Tøttrup
    0

    Hi touhid

    An xslt snippet is the same as an xslt file.

    Is it from xslt you want to output a date? Or is it from a master template or where do you have the date you want to output?

     

  • Touhid 97 posts 117 karma points
    Nov 01, 2010 @ 13:31
    Touhid
    0

    dear,

    again thnks. yes is it from xslt.

    touhid

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Nov 01, 2010 @ 13:41
    Steen Tøttrup
    0

    Then you could use:

     

    <xsl:value-of select="umbraco.library:FormatDateTime(data, 'dddd, MMM dd, yyyy')" />

    And the data parameter should be the node in xslt that contains the date.

     

  • Touhid 97 posts 117 karma points
    Nov 01, 2010 @ 14:02
    Touhid
    0

    Dear,

    i add this code but cant work.  where is the pblm?

    <xsl:variable name="data" select="umbraco.library:CurrentDate()"/>
     <xsl:value-of select="umbraco.library:FormatDateTime(@data, 'dddd, MMM dd, yyyy')" />

    touhid

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Nov 01, 2010 @ 14:04
    Steen Tøttrup
    0

    Do you get an error or what is the problem?

     

  • Touhid 97 posts 117 karma points
    Nov 01, 2010 @ 14:08
    Touhid
    0

    no, there is no error. but if i add following  this code i get an output: 2010-11-01T19:06:27

    code:

     <xsl:variable name="now" select="umbraco.library:CurrentDate()"/>
    <xsl:value-of select="umbraco.library:DateAdd($now, 'year', 1)"/>

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Nov 01, 2010 @ 14:12
    Steen Tøttrup
    0

    That is not the example I posted, have you tried that example? Did it work?

    For the DateAdd method you should use 'y', not 'year'

  • Touhid 97 posts 117 karma points
    Nov 01, 2010 @ 14:17
    Touhid
    0

    yeh.im tried that example. and my example work.

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Nov 01, 2010 @ 14:41
    Steen Tøttrup
    1

    So this doesn't work?

    <xsl:variable name="now" select="umbraco.library:CurrentDate()"/>

    <xsl:value-of select="umbraco.library:FormatDateTime($now, 'dddd, MMM dd, yyyy')" />


  • Touhid 97 posts 117 karma points
    Nov 02, 2010 @ 07:20
    Touhid
    0

    hi,

    im faild to work this date format. can you help me in details?

    touhid

     

     

  • Steen Tøttrup 191 posts 291 karma points c-trib
    Nov 02, 2010 @ 07:37
    Steen Tøttrup
    0

    I'm not sure how much more details I can give.

    If it's the format string you have problems with, take a look here: http://msdn.microsoft.com/en-us/library/1k1skd40.aspx

     

  • Touhid 97 posts 117 karma points
    Nov 02, 2010 @ 07:47
    Touhid
    0

    hi,

    i hav done this work by using this code

    <xsl:value-of select="umbraco.library:FormatDateTime($currentPage/@updateDate, ' dddd, MMMM dd, yyyy')"/>

    and thks you for help me.

    touhid

  • Touhid 97 posts 117 karma points
    Nov 02, 2010 @ 07:51
    Touhid
    0

    hi,

    also,can you help me how can i add a vertical scrol bar in a content page.

    touhid

  • Touhid 97 posts 117 karma points
    Nov 02, 2010 @ 08:29
    Touhid
    0

    Topic has been solved

Please Sign in or register to post replies

Write your reply to:

Draft