Welcome! Log In Create A New Profile

Advanced

NUMTOSTRING to display bracket as negative

Posted by PETER ZHOU 
PETER ZHOU
NUMTOSTRING to display bracket as negative
July 15, 2019 12:19PM
Hi,

How to use NUMTOSTRING() to display negative value with bracket ?
for example
-1234.56
as
(1234.56)


Regards,

PETER ZHOU
Re: NUMTOSTRING to display bracket as negative
July 16, 2019 01:18PM
Hi Peter,

1. Check the numeric value IF its negative.
2. If yes then combine NumToString and StringBuild.
3. If not then use NumToString only.

Hope to help you.

Regards
Vassilis
PETER ZHOU
Re: NUMTOSTRING to display bracket as negative
July 22, 2019 07:02PM
Vassilis Wrote:
-------------------------------------------------------
> Hi Peter,
>
> 1. Check the numeric value IF its negative.
> 2. If yes then combine NumToString and
> StringBuild.
> 3. If not then use NumToString only.
>
> Hope to help you.
>
> Regards
> Vassilis

Hi Vassills,

Actually i have used similar method to yours ( e.g. using ABS()). Was thinking windev has already a function call for it....

Regards,

PETER ZHOU
Re: NUMTOSTRING to display bracket as negative
July 23, 2019 10:12AM
Hi Peter,

You can use the ..DisplayMask property of control.

Regards
Vassilis
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: