It looks like you're new here. Sign in or register to get started.
ItemQty := 0; ItemAvailability := '1'; Check := EVALUATE(ItemQty,ItemAvailability); MESSAGE(FORMAT(Check)+' '+FORMAT(ItemQty));
ItemQty := 0; ItemAvailability := ''; Check := EVALUATE(ItemQty,ItemAvailability); MESSAGE(FORMAT(Check)+' '+FORMAT(ItemQty));
sridhar wrote: Hi Friends, How to convert the string '(-23)' to a decimal value -23. Thanks & Regards, N.Sridhar
txtString := '(-23)'; EVALUATE(decvalue,CONVERTSTR(txtstring,'()',' ')); MESSAGE('%1',decvalue);
Luc Van Dyck wrote: txtString := '(-23)'; EVALUATE(decvalue,CONVERTSTR(txtstring,'()',' ')); MESSAGE('%1',decvalue);
txtString := '(-23aBcDeF)'; txtCharactersToKeep := '1234567890.,-+'; EVALUATE(decValue,DELCHR(txtString,'=',DELCHR(txtString,'=',txtCharactersToKeep))); MESSAGE('%1',decValue)
Answers
I used the following code to convert the text into a decimal
ItemQty (DataType : Decimal)
ItemAvailability (DateType : Text)
Check (DataType : Boolean)
Check := EVALUATE(ItemQty,ItemAvailability);
MESSAGE('%1 %2',ItemQty,Check);
I am getting the output as - 0 No
Thanks & Regards,
N.Sridhar
For example:
Result is:
Yes 1
Result is:
No 0
I've tested this and it's fine.
Those of you who think you know everything are annoying to those of us who do. -
David Brent
How to convert the string '(-23)' to a decimal value -23.
Thanks & Regards,
N.Sridhar
Works Fine.
Thanks & Regards,
N.Sridhar
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!