Can't format decimal in HTML email using SMTP

Noeline
Noeline Member Posts: 54
Hi all

I am sending an html email from NAV and having problems with showing the amount data with 2 fixed decimals so it looks like the example below.

26.2
6,480
20.99

I would like it to look more like this:-

26.20
6,480.00
20.99

The data is is a table. Not sure if that's relevant. Any suggestions on the FORMAT statement?

Thanks - Noeline

Answers

  • matttrax
    matttrax Member Posts: 2,309
    FORMAT(YourNumber, 0, 0)

    The first zero tells it to use the whole number (or length of the string). The second zero tell it to do
    "<Sign><Integer Thousand><Decimals>"
  • Noeline
    Noeline Member Posts: 54
    Thanks for the reply Matttrax, but I have already tried that to no avail. It still only shows significant decimals.

    If all else fails I will have to convert it to text before I append it but I would really prefer a more elegant solution.

    Regards - Noeline
  • matttrax
    matttrax Member Posts: 2,309
    Try this format string

    <Precision,2><Sign><Integer Thousand><Decimals>
  • Noeline
    Noeline Member Posts: 54
    =D> =D> =D>

    Thanks!!

    I tried it before but my syntax or something was wrong and it didn't work.

    Tried it again this time and its perfect.

    Thanks for the help.