Home End User
New Blog Posts: Merging Reports - Part 1 and Part 2

Formatting fields at run time

edited November 2003 in End User
Hello;

I am using D6 with RB7.02. I have an end user app that shows string fields
that represent numbers. I need to be able to allow the end user to format
these to show the result with padded zeros, decimal point placement, etc.
What would be the format string if I had a string value of 999.9 and I
wanted to display it as 000999.9000?

Thanks,

Steve Wagner

Comments

  • edited November 2003
    Hi Steve,

    Depending on whether you would like a comma after the thousandths place you
    will want to adjust the display format to show the following...

    MyVariable.DisplayFormat := '#,000000.0000; -#,000000.0000'; {With commas}

    MyVarialbe.DisplayFormat := '000000.0000; -000000.0000'; {Without commas}

    Check out the Delphi help on DisplayFormat for more information.

    --
    Best Regards,

    Nico Cizik
    Digital Metaphors
    http://www.digital-metaphors.com
This discussion has been closed.