I'm having problems with a date issue. The thing is, that I have to variables datestart and dateend in my xlts. I what to only show images that are set between the to dates.
I'm trying using: umbraco.library:DateGreaterThanOrEqualToday() but with no luck I really need at umbraco.library:DateLessThanOrEqualToday() but that doesn't exists :)
How could I solved this?
My code: <xsl:variable name="datestart" select="./data[@alias='wwbanner_aktuel_fra']"/> <xsl:variable name="dateend" select="./data[@alias='wwbanner_aktuel_til']"/>
<xsl:choose> <xsl:when test="umbraco.library:DateGreaterThanOrEqual($datestart, $dateend)"> It's online ow </xsl:when> <xsl:otherwise> It's not online now </xsl:otherwise> </xsl:choose>
Help to date issue
Hi,
I'm having problems with a date issue.
The thing is, that I have to variables datestart and dateend in my xlts.
I what to only show images that are set between the to dates.
I'm trying using: umbraco.library:DateGreaterThanOrEqualToday() but with no luck
I really need at umbraco.library:DateLessThanOrEqualToday() but that doesn't exists :)
How could I solved this?
My code:
<xsl:variable name="datestart" select="./data[@alias='wwbanner_aktuel_fra']"/>
<xsl:variable name="dateend" select="./data[@alias='wwbanner_aktuel_til']"/>
<xsl:choose>
<xsl:when test="umbraco.library:DateGreaterThanOrEqual($datestart, $dateend)">
It's online ow
</xsl:when>
<xsl:otherwise>
It's not online now
</xsl:otherwise>
</xsl:choose>
Best regards
Palle
Hey Palle,
You could use the umbraco library to get the current date and store it in a variable
umbraco.library:CurrentDate()
Then use the DateGreaterThanOrEqual method to check all the dates (not sure on the order, but something like)
Matt
Hi Matt,
Thanks, that did the trick.
Have a great summer :)
Palle
is working on a reply...