This is in a currency field in a table so you should have the rules of the object helping you, I thought.
On Tue, Jan 27, 2015 at 12:45 PM, Joe Yoder <[email protected]> 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? > > 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 > > On Tue, Jan 27, 2015 at 12:06 PM, Richard Kaye <[email protected]> > wrote: > > > And the answer is yes. > > > > -- > > > > rk > > -----Original Message----- > > From: ProfoxTech [mailto:[email protected]] On Behalf Of > > Richard Kaye > > Sent: Tuesday, January 27, 2015 12:06 PM > > To: [email protected] > > Subject: RE: function to convert currency formated data in a text field > > > > I don't know. That's what the command line is for. :-) > > > > -- > > > > rk > > -----Original Message----- > > From: ProfoxTech [mailto:[email protected]] On Behalf Of > > Stephen Russell > > Sent: Tuesday, January 27, 2015 11:41 AM > > To: [email protected] > > Subject: Re: function to convert currency formated data in a text field > > > > On Tue, Jan 27, 2015 at 10:34 AM, Richard Kaye <[email protected]> > > wrote: > > > > > VAL returns a numeric from a text representation of numbers and IIRC > > > is also smart enough to handle currency character. > > > > > > > > > Is there a built in FoxPro function to convert a text field containing > > > "($123.45)" to the numeric value -123.45? I know I can tear it apart > > > to figure it out but am not sure what terms to use to look for a > > > function that does it for me. > > > ---------- > > > > > > Will VAL() register a negative amount ($123.45) as -123.45? > > > > [excessive quoting removed by server] _______________________________________________ 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/cajidmylpr6_nnzxkyasdhzwy9qbwa72dhpdos9dorxoshx-...@mail.gmail.com ** 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.

