Home > Archive > FoxPro database connector > December 2005 > Decimal to Character









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Decimal to Character
wipeout64@hotmail.com

2005-11-30, 8:26 pm

How can I convert a decimal (.0290) to a character without loosing the
decimal and the numbers to the right of the number? Str() truncates the
decimal and all numbers to the right of the decimal.

Thanks

Fred Taylor

2005-11-30, 8:26 pm

cVal = TRANSFORM(0.0290)

--
Fred
Microsoft Visual FoxPro MVP


<wipeout64@hotmail.com> wrote in message
news:1133384762.102431.298500@g43g2000cwa.googlegroups.com...
> How can I convert a decimal (.0290) to a character without loosing the
> decimal and the numbers to the right of the number? Str() truncates the
> decimal and all numbers to the right of the decimal.
>
> Thanks
>



Cindy Winegarden

2005-12-04, 8:24 pm

Hi,

Have you looked at the optional arguments for the Str() function?

STR(nExpression [, nLength [, nDecimalPlaces]])


--
Cindy Winegarden MCSD, Microsoft Visual FoxPro MVP
cindy_winegarden@msn
.com www.cindywinegarden.com
Blog: http://spaces.msn.com/members/cindywinegarden


"wipeout64@hotmail.com" wrote:

> How can I convert a decimal (.0290) to a character without loosing the
> decimal and the numbers to the right of the number? Str() truncates the
> decimal and all numbers to the right of the decimal.
>
> Thanks
>
>

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com