For partners that build or integrate commercially available applications and service solutions with the Oracle Cloud Platform
For partners that provide implementation or managed services around Oracle Cloud Applications
Hey,
I'm facing the following challange: I have a CRM and a marketing system integrated by ICS. There is a field in the CRM in CET timezone but the marketing system need it in eastern time zone. Is there a easy way to transform from CET timezone to eastern time zone?
Regards
Yves
Did you try using fn:adjust-dateTime-to-timezone () in mapper.
Depending on the data type there is a function to convert into a time zone
These fn:adjust-xxxx are available in Mapper and Assignments.
Dear Yves,
I have written a dedicated blog on how to change date and time from one timezone to another in ICS.
https://www.techsupper.com/2017/11/convert-utc-date-time-to-another.html?m=1
I'm sure that you want this exactly.
Regards,
Ankur
Hey, thanks for the fast replys. I tried the following in the mapper: <xsl:value-of select = "string(fn:adjust-dateTime-to-timezone(xsd:dateTime('2018-01-01T10:00:00'), xsd:dayTimeDuration('PT5H')))">
The result is 2018-01-01T10:00:00+05:00, which is not bad, but not exactly what I need. I need to push date and time back to Eloqua, and Eloqua can not work with timezone additions. So what I need as result is 2018-01-01T15:00:00. Is this somehow possible?
Hi Yves,
Please use substring-before function to get the value before + . Then you will get exactly you want.
Regards,
Ankur
If the datatype of Eloqua field/element is xs:dateTime, then you do not need the string() function. fn:adjust-dateTime-to-timezone(xsd:dateTime('2018-01-01T10:00:00'), xsd:dayTimeDuration('PT5H')) should do it.
If Eloqua element is xsd:string (ugh!) then I can think two ideas (I have not prove them, so do not expect them to be proven) :
1. Try xsd:dateTime(fn:adjust-dateTime-to-timezone(xsd:dateTime('2018-01-01T10:00:00'), xsd:dayTimeDuration('PT5H')) )
2. use combination fo substring-before and fn:timezone-from-dateTime(dateTime) to get the substring w/o the time zone.
Hey Jorge,
I tried the first apporach:
<xsl:value-of select = "xsd:dateTime(fn:adjust-dateTime-to-timezone(xsd:dateTime('2018-01-01T10:00:00'), xsd:dayTimeDuration('PT5H')))">
The result is: 2018-01-01T10:00:00+05:00
I did not get the idea behind your second approach.
Regards
Yves
I was able to just 'add'...
<xsl:value-of select = "xsd:dateTime(/nssrcmpr:schedule/nssrcmpr:startTime) + xsd:dayTimeDuration('PT5H')">
When I ran a test using:
<ns0:startTime>2018-07-06T18:00:00.000</ns0:startTime>
My result was:
<nstrgmpr:messageId>2018-07-06T23:00:00</nstrgmpr:messageId>
Does that work for you?
Hello Kevin,
this works for me too. Thanks everybody.
Regards
Yves
Hey, thanks for the fast replys. I tried the following in the mapper: <xsl:value-of select = "string(fn:adjust-dateTime-to-timezone(xsd:dateTime('2018-01-01T10:00:00'), xsd:dayTimeDuration('PT5H')))">
The result is 2018-01-01T10:00:00+05:00, which is not bad, but not exactly what I need. I need to push date and time back to Eloqua, and Eloqua can not work with timezone additions. So what I need as result is 2018-01-01T15:00:00. Is this somehow possible?