Hi All,
I am trying to convert this (475,971.29) string by replacing the '(' ')' and making it as a positive number using the formula component, but not getting proper output with correct decimal places.
IF
StartsWith([Outstanding], '(') AND EndsWith([Outstanding], ')')
THEN
ToNumber('-'+REGEX_REPLACE([Outstanding],'[[:punct:]]|[\$\+<=>\^`\|~]',''), '0')
ELSE
ToNumber([Outstanding],'0')
ENDIF
Input: (475,971.29)
Expected output: -475971.29