Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
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.
Is this done from a xslt snippet? Or from a UserControl or where do you have the data?
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
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?
again thnks. yes is it from xslt.
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.
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')" />
Do you get an error or what is the problem?
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)"/>
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'
yeh.im tried that example. and my example work.
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')" />
hi,
im faild to work this date format. can you help me in details?
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
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.
also,can you help me how can i add a vertical scrol bar in a content page.
Topic has been solved
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
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.
Is this done from a xslt snippet? Or from a UserControl or where do you have the data?
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
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?
dear,
again thnks. yes is it from xslt.
touhid
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.
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
Do you get an error or what is the problem?
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)"/>
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'
yeh.im tried that example. and my example work.
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')" />
hi,
im faild to work this date format. can you help me in details?
touhid
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
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
hi,
also,can you help me how can i add a vertical scrol bar in a content page.
touhid
Topic has been solved
is working on a reply...