cancel
Showing results for 
Search instead for 
Did you mean: 

Current Date in XSLT 1.0 Mapping

Former Member
0 Kudos

Hi All,

Very Good Morning...

I have one issue my XSLT mapping, One filed is required current date and time.But in XSLT 1.0 there is no standard date function. But XSLT 2.0 version is aviable.

I am using the XSLT1.0 version.i saw in SDN some threads are related to this issue. XSLT supported for Java extensions.

Upto now i am n't working with JAVA mapping. How i can create a JAVA extension and how i can import to Integration Respoistery....

Kindly give me suggestion about this issue.

Thank you very much.

Sateesh

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi All,

Kindly suggest me about my issue.

Thank you

Sateesh

madhusudana_reddy2
Contributor
0 Kudos

Dear Sateesh,

Declare xlst variables at start of xsl program like below

<xsl:output method="xml" indent="yes"/>

<xsl:variable name="today_formatted" select="java:java.text.SimpleDateFormat.new('yyyyMMdd')"/>

<xsl:variable name="time_formatted" select="java:java.text.SimpleDateFormat.new('HHmmss')"/>

and use them in xsl mapping

<xsl:value-of select="substring(concat(java:format($today_formatted, $date),$blanks),1,8)"/>

<xsl:value-of select="substring(concat(java:format($time_formatted, $date),$blanks),1,6)"/>

thanks,

madhu

Former Member
0 Kudos

Hi Madhusudhan,

Thanks for your suggestion.

I tried it what you given the format, I am geeting error in XSLT mapping.I am n't geeting the error report.

Thank you .

Sateesh