Actually, that gives you the wrong number (it gives you 499999999999989.00).
Try this instead: OCONV(ICONV(FIELD(var,"E",1),'MR4'),'MR4')*(10^FIELD(var,"E",2)) Note that MR4 is for precision 4. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mecki Foerthmann Sent: Friday, April 18, 2008 1:54 PM To: [email protected] Subject: Re: [U2] Scientific Notation OCONV(OCONV(var,'MCN'),'MR2') should do the trick. Doug Farmer wrote: > Good Day All! > > Does anyone know of a UniData function or ICONV option to convert > scientific notation to a decimal number. > > We are receiving some numbers in an XML packet from a 3rd party where > sometimes Scientific Notation is used, instead of a decimal value. > > For example, instead of 5 cents coming in from the XML as ".05", the XML > contains "4.99999999999989E-02". This is due to a percentage > calculation in a SQL data base. There is no way I can change the XML > Generation software, so I must deal with it on the UniData side. > > Thanks > > Doug > -------------------------------------------------------- > > This e-mail is for the use of the intended recipient(s) only. If you have > received this e-mail in error, please notify the sender immediately and then > delete it. If you are not the intended recipient, you must not use, disclose > or distribute this e-mail without the author's prior permission. We have > taken precautions to minimize the risk of transmitting software viruses, but > we advise you to carry out your own virus checks on any attachment to this > message. We cannot accept liability for any loss or damage caused by software > viruses. Any views and/or opinions expressed in this e-mail are of the author > only and do not represent the views of Epicor Software Corporation or any > other company within its group. > ------- > u2-users mailing list > [email protected] > To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/ ------- u2-users mailing list [email protected] To unsubscribe please visit http://listserver.u2ug.org/
