Skip to Main Content

DevOps, CI/CD and Automation

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!

xQuery: How to convert a xs:dateTime to UTC based on the value in the column?

user8958419Mar 29 2017

I have a xquery where I am mapping as below:

<ns0:REV_DTE>{data(fn-bea:dateTime-to-string-with-format('MMM-dd-yyyy HH:mm:ss',fn:adjust-dateTime-to-timezone(fn-bea:dateTime-from-string-with-format('MMM-dd-yyyy HH:mm:ss',$ns1:IssueDate))))}</ns0:REV_DTE>    

I want the result as below:

If IssueDate = Feb-09-2017 11:13:00 then the converted date should be  Feb-09-2017 16:13:00 irrespective of when I am doing the conversion. Currently, if I run the piece of code today, I get back  Feb-09-2017 15:13:00  since the time difference between EST and UTC now is 4 hours where as on Feb-09 the time difference was 5 hours.

Basically what I want is the time to adjust based on the datetime passed in and not on the current date. I hope my question makes sense.         

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 26 2017
Added on Mar 29 2017
0 comments
1,922 views