Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

11 digit number passed to c-variable

Status
Not open for further replies.

MikeL91

Programmer
Feb 8, 2001
100
US
i am having a problem, i have a numeric variable (99999999991) with 11 digits, and when i pass it to a charicter variable it comes out: 009.999E+10
this is the code:
cCert2 = padl(alltrim(str(nCert)),11,'0')

ncert value is 99999999991

ccert2 comes out 009.999E+10

how do i make cCert2 "99999999991"


thanks in advance

-Mike
 
MikeL91

This works for me

nCert = 99999999991
?STR(ncert,11,0) Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first
 
Or you could use this:

cCert=padl(transform(nCert),11,"0")

The transform() function will return the character equivalent of any other data type.

Hope this helps.

Dave
 
Dave, Transform worked for me. Thanks for your help, guys.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top