title: Comparing umbraco.library:CurrentDate() with a datepicker field
body: <p>I am having trouble with the following problem. I want to compare two <strong>Date Picker with time</strong> fields with <strong>umbraco.library:CurrentDate()</strong> so that i can make an XSLT which does three different things depending on what time it is compared to what time i entered in the two <strong>Date Picker with Time</strong>.  </p>
  
  <p>Currently, i have this:</p>
  
  <pre><code>&lt;xsl:variable name="currenttime" select="umbraco.library:CurrentDate()" /&gt;
  &lt;xsl:choose&gt;
      &lt;xsl:when test="$currenttime &amp;lt; dateEvent"&gt;
          &lt;a href="{umbraco.library:NiceUrl(@id)}"&gt;Event is not yet live&lt;/a&gt;
      &lt;/xsl:when&gt;
      &lt;xsl:when test="$currenttime &amp;gt; dateEvent and $currenttime &amp;lt; dateEventpassed"&gt;
          &lt;a href="{umbraco.library:NiceUrl(@id)}/live.aspx"&gt;Event is live&lt;/a&gt;
      &lt;/xsl:when&gt;
      &lt;xsl:otherwise&gt;
          &lt;a href="{umbraco.library:NiceUrl(@id)}/different.aspx"&gt;Event has passed&lt;/a&gt;
      &lt;/xsl:otherwise&gt;
  </code></pre>
  
  <p></p>
  
  <p>But it somehow does not seem to work. Might this have anything to do with the way either date is formatted? I'm not even close to being an expert in Umbraco so any help is much appreciated </p>