Instead it is giving me something more like 11/1/2009. Here is the code snippet:
<xsl:value-of select="umbraco.library:FormatDateTime(data [@alias='eventDate'], 'd')"/> <xsl:variable name="dateNum" select="umbraco.library:FormatDateTime(data [@alias='eventDate'], 'dd')"/> <xsl:choose> <xsl:when test='dateNum=1 or 21 or 31'> <xsl:text>st</xsl:text> </xsl:when> <xsl:when test='dateNum=2 or 22'> <xsl:text>nd</xsl:text> </xsl:when> <xsl:otherwise> <xsl:text>th</xsl:text> </xsl:otherwise> </xsl:choose>
I can substitute d for dd and get 01, 02, ..., 30, 31, but that isn't the format that I want. I'm pretty sure that I need to use the MSDN custom date properties but how do I get it to toggle over? Thanks.
date format
According to http://our.umbraco.org/wiki/reference/umbracolibrary/formatdatetime I should be getting a single or doube digit date such as 1, 2, ..., 30, 31.
Instead it is giving me something more like 11/1/2009. Here is the code snippet:
I can substitute d for dd and get 01, 02, ..., 30, 31, but that isn't the format that I want. I'm pretty sure that I need to use the MSDN custom date properties but how do I get it to toggle over? Thanks.
Ahhh, it forces it into a custom date if you add a white space. In effect, 'd' becomes ' d' and it goes into the custom date format.
So I found that I had to write this code like this to get it to work:
How come writing it like this doesn't work:
So confused???!!!
You're close!
Try this...
cheers,
doug.
Thanks Doug! This forum beats beating my head on my table anyday...
is working on a reply...