Skip to Main Content

Integration

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!

DateTime with Timezone in XSLT

Sen2008Feb 8 2013 — edited Feb 26 2020
All,

version: 11.1.1.4
I have a requirement where in I have to validate the datetime in XSLT. User A will send a xml doc with a dateformat he is comfortable. like this many users will send a similar xml doc to my application which can have datetime in any format. But my application wants in a particular format i.e '2013-01-20T05:11:42+05:30'. In XSLT I want to check if the dateformat in the xml doc is in the expected format, send the doc as it is, otherwise format it to the expected date. I'm exploring xp20:format-dateTime function to achieve this.

to put it in simple algorithm

if dateformatin xml doc = 'format expected' then
send as it is
else
format it to expected date

I tried using the xp20:format-dateTime function as <xsl:value-of select="xp20:format-dateTime(/ns0:cXML/Request/InvoiceDetailRequest/InvoiceDetailRequestHeader/@invoiceDate,'[Y0001]-[M01]-[D01]T[H01]:[m01]:[s01]')"/> but don't know how to add the timezone to it. Any help is appreciated.

thanks
sen
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Mar 13 2013
Added on Feb 8 2013
6 comments
1,904 views