The ? nNumber needs to be on a new line.... damned wordwrap!

Dave

-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Dave Crozier
Sent: 27 January 2015 16:44
To: ProFox Email List
Subject: RE: function to convert currency formated data in a text field

cText="  -$1,230.79"
nNumber=(Chrtran(cText, chrtran(cText, "0123456789.-", ""), "")) ? nNumber

Here we can deal with -ve numbers as well as spaces in numbers.

Dave
PS... This was discussed a few weeks ago, so not down to me entirely.

-----Original Message-----
From: ProFox [mailto:[email protected]] On Behalf Of Joe Yoder
Sent: 27 January 2015 16:32
To: [email protected]
Subject: function to convert currency formated data in a text field

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.

Thanks in advance,

Joe


--- StripMime Report -- processed MIME parts --- multipart/alternative
  text/plain (text body -- kept)
  text/html
---

[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/[email protected]
** 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