FoMS Experts

Forum / DataWeave 2

DataWeave 2
DataWeave 2

Stats: 2 topics, 6 messages

Newest topic:How to format dates in Dataweave?

Actual topic:How to format dates in Dataweave?

Last message:Edo Schatz, Thursday, 21.5.2020 / 13:50

TOPIC

Author of topic:Remmer CH

Messages:2

Views:1369

<1>

Remmer CHNo card

Remmer CH

M / 35 years

Schwyz

Switzerland

Level: Newbie / 4 posts

Posted: Monday, 18.5.2020 / 13:48

Topic: How to format numbers in Dataweave?

Hi,

how to format a number in DataWeave or is it somehow being done with Java? Tnx!

Edo SchatzGreen card

Edo Schatz

M / 47 years

Köln

Germany

Level: New hope / 45 posts

Title: Administrator

Posted: Monday, 18.5.2020 / 16:33

Topic: How to format numbers in Dataweave?

In Dataweave numbers are formatted according to this Java class:

https://docs.oracle.com/javase...

Basically, you should do something like this:

format: "#,###.##"
format: "#,###"
format: "#,###.00"

where # represents any non-zero digit and 0 represents any digit.

If you need more clear example, just ask for more thorough examples. I hope this will already guide you to your solution.

<1>
  • HOT TOPICS
  • NEW TOPICS
  • MOST POPULAR
  • MY TOPICS
  • INVOLVED IN
  • FOLLOWED
Rules and regulations
Register now