on 04-04-2012 8:04 PM
Hi,
I'm already formatting a Date to different formats depending on language, using this:
<xsl:value-of select="java:com.sap.xmii.Illuminator.ext.ExtFunctions.dateFromXMLFormat(., java:com.sap.xmii.Illuminator.localization.WebLocalizer.getLocalizedString('PROJECT', $Language, 'DATE_FORMAT'))"/>
What should I use to do timezone offset conversions? I mean, what java:com.sap.xmii... should I use to add or remove hours depending of a offset>
Thank you.
Something like this might work:
<xsl:value-of select="java:com.sap.xmii.Illuminator.ext.ExtFunctions.dateFromSecondsFormatted((java:com.sap.xmii.Illuminator.ext.ExtFunctions.dateToSeconds(.)+<your time zone seconds offset, like 7200L for 2 hours >), java:com.sap.xmii.Illuminator.localization.WebLocalizer.getLocalizedString('PROJECT', $Language, 'DATE_FORMAT'))"/>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Christian,
I couldn't put this to work! It keep saying: Unable To Create Stylesheet Transformation
I also tried just to do the dateToSeconds step and it is not working either. I tried:
<xsl:value-of select="java:com.sap.xmii.Illuminator.ext.ExtFunctions.dateToSeconds(.)"/>
And got the same " Unable To Create Stylesheet Transformation " message.
Any other idea?
Thank you!
The dateFromOffset method might work for you:
<xsl:value-of select="java:com.sap.xmii.Illuminator.ext.ExtFunctions.dateFromXMLFormat(java:com.sap.xmii.Illuminator.ext.ExtFunctions.dateFromOffset(. , '1900-01-01T00:00:00', '1900-01-01T02:00:00'), 'yyyy-MM-dd HH:mm:ss')"/>
It adds the difference of date2 and date3 to date1.
User | Count |
---|---|
12 | |
7 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.