At 10:45 2015-01-27, you wrote:
I guess the answer is "No" there is no built in function to do it for us.

Here is what I came up with - anyone want to improve on it?

Yes. Do not eliminate the currency symbol from what is passed to val() as "If the first character of cExpression is a dollar sign ($),VAL( ) returns a currency value. In all other situations VAL( ) returns a numeric value."

FUNCTION C2Num
  PARAMETERS m.cstr
RETURN VAL(chrtran(m.cstr, '($,', '-'))  && Change left pren to minus,
eliminate dollar sign, comma, and space and let VAL take it from there

[snip]

Sincerely,

Gene Wirchenko


_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to