I'm trying to use DateGreaterThanOrEqualToday to display a list of nodes. The XSLT saves fine, but when I view the page I get an error: Error parsing XSLT file: \xslt\ListFutureEvents.xslt
When I yank the DateGreaterThanOrEqualToday conditional, it works fine but displays past events. I've also outputted the FormatDateTime and I have a well-formed date being passed to the function. Any ideas? I've been using the following post for reference:
Looks like that function will throw an exception if it won't parse as a date. Have you tried changing your format to MM/dd/yyyy? Seems like if your culture settings are set to US a string like 21/05/2010 might not parse as a date.
If that's not it, best to run it in the debugger locally to see what exception is actually being thrown.
DateGreaterThanOrEqualToday Error
I'm trying to use DateGreaterThanOrEqualToday to display a list of nodes. The XSLT saves fine, but when I view the page I get an error: Error parsing XSLT file: \xslt\ListFutureEvents.xslt
Here's where I'm using it:
<xsl:variable name="eventNodes" select="umbraco.library:GetXmlNodeById($source)/node [(string(data [@alias='umbracoNaviHide']) != '1') and (umbraco.library:DateGreaterThanOrEqualToday(umbraco.library:FormatDateTime(./data[@alias = 'dateStart'], 'dd/MM/yyyy')))]"/>
Just for kicks, maybe try removing the FormatDateTime or try formatting differently?
The below code works for me, eventEndDate is coming directly from a Date Picker w/Time
Looks like that function will throw an exception if it won't parse as a date. Have you tried changing your format to MM/dd/yyyy? Seems like if your culture settings are set to US a string like 21/05/2010 might not parse as a date.
If that's not it, best to run it in the debugger locally to see what exception is actually being thrown.
Get your date and put it into the variable with the date format. Then use XSL if to test the DateGreaterThanOrEqualToday.
Ugh, the date formatting was the issue. Thanks so much.
is working on a reply...