Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

how to generate current time in the format yyyy-mm-ddThh:mm:ssZ in the xslt

843834Oct 12 2005 — edited Oct 17 2005
Hello,

i am tring to generate current time in the format yyyy-mm-ddThh:mm:ssZ in my xlst file.
the following info are necessary,
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:java="http://xml.apache.org/xslt/java" exclude-result-prefixes="java"
version="1.0">
<xsl:attribute name="generationDate"><xsl:value-of select="java:format(java:java.text.SimpleDateFormat.new('yyyy-mm-dd hh:mm:ss'), java:java.util.Date.new())"/></xsl:attribute>

but java SimpleDateFormat doesnt support yyyy-mm-ddThh:mm:ssZ.

thanks in advance.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 14 2005
Added on Oct 12 2005
6 comments
579 views