Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Anthony Candaele 1197 posts 2049 karma points
    Sep 14, 2011 @ 15:21
    Anthony Candaele
    0

    problem comparing dates

    Hi,

    For a listing of conferences I want to show the upcoming conferences under the heading 'upcoming conferences'. The past conferences must be shown under the heading 'past conferences'.

    So I try to compare the date property of the conference with the currentdate like this:

    <xsl:when test="umbraco.library:DateGreaterThanOrEqual(conferenceDate,currentDate)">

    but this generates an xslt error

    Anyone knows how to solve this?

    Thanks for your help,

    Anthony Candaele

  • Anthony Candaele 1197 posts 2049 karma points
    Sep 14, 2011 @ 15:31
    Anthony Candaele
    0

    I forgot to mention that conferenceDate is of data type 'Date Picker'

  • Anthony Candaele 1197 posts 2049 karma points
    Sep 14, 2011 @ 15:54
    Anthony Candaele
    0

    I guess I should convert the Datepicker values 'conferenceDate' and 'currentDate' to string values, only how do you convert a date to a string in Xslt?

  • Anthony Candaele 1197 posts 2049 karma points
    Sep 14, 2011 @ 16:05
    Anthony Candaele
    0

    tried:

    <xsl:when test="umbraco.library:DateGreaterThan(string(conferenceDate), string(currentDate))">

    but not working either :(

  • Anthony Candaele 1197 posts 2049 karma points
    Sep 14, 2011 @ 16:10
    Anthony Candaele
    0

    well watha y'know, just tried this:

    <xsl:when test="conferenceDate &lt; currentDate">

    and it works!

    Or how people can make things more complicated than they are :)

Please Sign in or register to post replies

Write your reply to:

Draft