cancel
Showing results for 
Search instead for 
Did you mean: 

how to change the time format in XSLT Mapping

Former Member
0 Kudos

Hi ,

my scenario is IDOC to SOAP , and my requirement to change the time format from hhmmss to hh:mm:ss using XSLT mapping.

i am trying with following function <xsl:value-of select=" fn:format-time($d,'hh:mm:ss')"/> but throwing an error while testing in PI 7.0

following error i am getting in test tab while testing

  •               Unable to find resource http://www.w3.org/2005/xpath-functions.class  
  •               (urn:ERP:DR_CM_116_xxxx, -1) in the following software component versions: 867c0d40-14c2-11dc-9419-f8e4ac17f893

can any one suggest the solution to change the time format to hh:mm:ss

thanks in advance..

Accepted Solutions (0)

Answers (2)

Answers (2)

gagandeep_batra
Active Contributor
0 Kudos

hi Surya ,

check below  thread

http://scn.sap.com/message/8402096

Regards

gagan

Former Member
0 Kudos

hi gagan

i tried this but not worked for me..

surya

Former Member
0 Kudos

Hi surya,

why don't you have a look at http://www.w3.org/TR/xslt20/#format-date (

16.5.3 Examples of Date and Time          Formatting)

cheers,

Edu

Former Member
0 Kudos

hi Eduardo,

i tried this too not worked for me.

surya.

Former Member
0 Kudos

Hi Surya,

did you try

<xsl:value-of select=" fn:format-time($d,'hh:mm:sstt')"/>?

cheers,

Edu

Former Member
0 Kudos

Hi Edu,

I tried the function and getting error  :

  •               javax.xml.transform.TransformerException: com.sap.engine.lib.xml.util.NestedException: Function with name 'fn.format-time' not found in context library.           

code as <xsl:variable name="date" select="ZDEBMAS01/IDOC/E1KNA1M/E1KNVAM/MOAB1" />

     <xsl:value-of select="fn.format-time($date, 'hh:mm:sstt')"/>

regards

Surya