Why don't you just convert the characters into numbers before converting the values?
> Unfortunately, the possible values are more then that, it's just a > sample. > The values are amount of rainfall data, so it has numbers (0 to 400) > also with floating number 0.5, 1.7, and so on. > The field of old data on the database was set with string type, which > "x" represent as a value less then 0.5, "-" represent as no rain, and > NULL represent as no data. For example, you could use Replace to change "x" into 0.4, "-" into 0 and NULL (search for chr$(0)...) into 0.3 or whatever. So everything is a value now, and the converting functions will be happy. Regards Rolf ------------------------------------------------------------------------------ Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user