title: current-dateTime() to number
body: <p>I need to convert the current-dateTime() to a number, because the output only allows an integer (or long). How can I do that?</p>
  
  <p>My desired output:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;currentDate&gt;NaN&lt;/currentDate&gt;
  </code></pre>
  
  <p>My XSLT:</p>
  
  <pre><code>&lt;xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" version="2.0"&gt;
      &lt;xsl:output method="xml" encoding="utf-8" indent="yes"/&gt;
      &lt;xsl:variable name="version" select="'1.0'"/&gt;
  
      &lt;xsl:template match="/"&gt;
          &lt;xsl:element name="currentDate"&gt;
              &lt;xsl:value-of select="number(current-dateTime())"/&gt;
          &lt;/xsl:element&gt;
      &lt;/xsl:template&gt;        
  
  &lt;/xsl:stylesheet&gt;
  </code></pre>
  
  <p>But I get this here:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;currentDate&gt;NaN&lt;/currentDate&gt;
  </code></pre>
  
  <p>When I remove the number() I do get the timestamp, but I need to have a clean number.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;currentDate&gt;2014-01-15T07:01:02.526+01:00&lt;/currentDate&gt;
  </code></pre>
  
  <p><strong>How can I convert the timestamp to a clean number?</strong></p>