Friday, December 20, 2024

OIC XSLT - Use of fn:format-number() | Formatting Large Amount Values to Two Decimal Places in XSLT

Use Case: Formatting Large Amount Values to Two Decimal Places in XSLT.

Scenario:

We are receiving an amount field value in the following format:

Input Data: 0000567892987

Our goal is to transform this input into a properly formatted number with two decimal places:

Target Output: 5678929.87

solution code:

fn:format-number((number($ReadSourceFile/nsmp0:ReadResponse/ns25:Payments/ns25:FileTrailer/ns25:TotalStubAmount) div 100), "#.00")




No comments:

Post a Comment

Featured Post

11g to 12c OSB projects migration points

1. Export 11g OSB code and import in 12c Jdeveloper. Steps to import OSB project in Jdeveloper:   File⇾Import⇾Service Bus Resources⇾ Se...