How to format decimal numbers in Dataweave 1.0 Mule 3
This article explains the different ways of formatting numbers, integers in Dataweave. Formatting numbers of double data type to number and then converting to string. Here are a few examples of number conversion with Dataweave. The "," separator is applicable for only string format.
Also read: How to format date and time in Dataweave Mule 4
Formatting decimal numbers in Dataweave 2.0 (Mule 4)
Let us understand how did we use the same example in Mule 4 i.e Dataweave 2.0. You can observe from the below example that, Dataweave 1.0 uses as:number whereas Dataweave 2.0 uses as Number. Similarly, as :string from Dataweave 1.0 is replaced by as String
The "," separator is applicable for only string format.
Please comment if you have any more ideas to format the numbers and converting numbers to strings in Mule.
0 Comments