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
A simple problem, I'm sure. I wish to add the current date/time into a meta tag, something where the rendered code would look like:
<meta name="Copyright" content="Copyright© 12/30/2010 18:00" />
I'm aware of the following xslt: <xsl:value-of select="umbraco.library:CurrentDate()"/>
Hi Kyle
If you're using the CurrenDate() extension I guess what you need to do is format the output with FormatDateTime
<xsl:variable name="currentDate select="umbraco.library:CurrentDate()" />
<xsl:value-of select="umbraco.library:FormatDateTime($currentDate,'MM/dd/yyyy hh:mm')" />I think this should do the trick for you. You can read more about the manipulation options with FormatDateTime here: http://our.umbraco.org/wiki/reference/umbracolibrary/formatdatetime
Hope this helps.
/Jan
Thanks Jan -- That did the trick!
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Inserting the current date and time
A simple problem, I'm sure. I wish to add the current date/time into a meta tag, something where the rendered code would look like:
<meta name="Copyright" content="Copyright© 12/30/2010 18:00" />
I'm aware of the following xslt: <xsl:value-of select="umbraco.library:CurrentDate()"/>
Hi Kyle
If you're using the CurrenDate() extension I guess what you need to do is format the output with FormatDateTime
<xsl:variable name="currentDate select="umbraco.library:CurrentDate()" />
<xsl:value-of select="umbraco.library:FormatDateTime($currentDate,'MM/dd/yyyy hh:mm')" />
I think this should do the trick for you. You can read more about the manipulation options with FormatDateTime here: http://our.umbraco.org/wiki/reference/umbracolibrary/formatdatetime
Hope this helps.
/Jan
Thanks Jan -- That did the trick!
is working on a reply...