from string to number xslt
<p>I want to make a comparison of two different date’s. To realize that, I want to transform to number.
Input example:</p>

<pre><code>&lt;file&gt;
                &lt;date&gt;2015-11-06 09:00/&gt;
&lt;/file&gt;
&lt;history&gt;
                &lt;date&gt;2016-01-12 10:00/&gt;
&lt;/history&gt;
</code></pre>

<p>First I extract the time, from date. And put the result in a var.</p>

<pre><code>   &lt;xsl:for-each select="//item/metadata/document/file/date"&gt;          
            &lt;xsl:variable name="d_log" 
                select="substring-before(., ' ')" as="xs:string"/&gt;
</code></pre>

<p>So the value of the variable would be, for example 2015-11-06.
The next step is, that I want to transform 2015-11-06 in to 20151106.</p>

<p>Questions is how I can transform from a string to a number?
Or is there a easier way?</p>