Forum Discussion

Raph's avatar
Raph
Icon for Helper III rankHelper III
3 years ago
Solved

European number format

Hello 

 

I have this measure in a card : 

 

Text invoice = "Please send your invoice of " & FORMAT([Total royalties], "###,###.00") & " € to [email protected]".
This measure displays the following format :  1,465.78 €...  but I am looking for getting the european format : 1.465,78 €
 
I have already the regional parameters settled on French  (global and active file).
 
Any idea?
 
Thank you!
Raphaël
  • Raph 
    Try below workaround measure and let me know if that works

    Text invoice =
    VAR USFormatted = FORMAT([Total royalties], "###,###.00")
    VAR Step1 = SUBSTITUTE(USFormatted, ",", "|") -- Replace ',' with a temporary character ('|')
    VAR Step2 = SUBSTITUTE(Step1, ".", ",") -- Replace '.' with ','
    VAR EuroFormatted = SUBSTITUTE(Step2, "|", ".") -- Replace the temporary character ('|') with '.'
    RETURN
        "Please send your invoice of " & EuroFormatted & " € to [email protected]"

    -------------------------------------------------------------------------------------------------------------------------------

     

    Good day, amigo! Have I provided the solution? If so, please let me know by adding the lovely, sweet "solution" tag to my post. And hey, if you're feeling very kind, give me a Kudos; after all, who doesn't enjoy a little digital gratitude?

    -------------------------------------------------------------------------------------------------------------------------------

2 Replies

  • Raph 
    Try below workaround measure and let me know if that works

    Text invoice =
    VAR USFormatted = FORMAT([Total royalties], "###,###.00")
    VAR Step1 = SUBSTITUTE(USFormatted, ",", "|") -- Replace ',' with a temporary character ('|')
    VAR Step2 = SUBSTITUTE(Step1, ".", ",") -- Replace '.' with ','
    VAR EuroFormatted = SUBSTITUTE(Step2, "|", ".") -- Replace the temporary character ('|') with '.'
    RETURN
        "Please send your invoice of " & EuroFormatted & " € to [email protected]"

    -------------------------------------------------------------------------------------------------------------------------------

     

    Good day, amigo! Have I provided the solution? If so, please let me know by adding the lovely, sweet "solution" tag to my post. And hey, if you're feeling very kind, give me a Kudos; after all, who doesn't enjoy a little digital gratitude?

    -------------------------------------------------------------------------------------------------------------------------------