converting Datestring to milliseconds
Hi,
i searched a long time in the internet and could'nt find a solution that worked.
I want to convert a date-string like '31.12.2004 23:00' to milliseconds.
Last thing i tried was this:
<xsl:variable name="format" select="'EEEE'"/>
<xsl:variable name="formatter" select="java:java.text.SimpleDateFormat.new($forma t)"/>
<xsl:variable name="date" select="java:IntDate.getDate('12.10.2004 23:00')"/>
<p>Date: <xsl:value-of select="java:format($formatter, $date)"/></p>
but this gave me no output at all.
I need this because i want to make two buttons at the end of a list of Products per hour. The first button shows products one hour in the past an the other one shows products one hour in the future. This already works, because i made it with string operations (10 to 11 to 12...). But when i come to the next day there is no chance to make it with string operations becaus i have to change the Date and not only the hours. So i wanted to calculate the date via those millisecs, but found nothing to convert that string.
Any ideas?
|