RJustify(string, length)

> -----Original Message-----
> From: Jeff Waris [mailto:[EMAIL PROTECTED]
> Sent: Monday, December 06, 2004 1:06 PM
> To: CF-Talk
> Subject: RE: Fixed Width variable question.
> 
> Maybe I didn't explain this good enough... LOL Its Monday....
> 
> I know that I can format a number with numberformat... I'd like to apply
> this to text variables as well...
> 
> Lets say I am interested in doing this...
> 
> 123
> 1234
> 12345
> 123456
> 
> Setting them so they would be
>       123
>      1234
>     12345
>    123456
> 
> Or maybe a better example....
>     Cat
>   Apple
>  Orange
> 
> (Instead of 0's, using spaces...)
> 
> 
> Basically I am trying to output fields in a query to a text file in a
fixed
> width fasion, Field 1 allow only 5 chars, field 2  allow only 11 chars,
> etc... That way each field would have a certain column start and finsh in
> the text file...
> 
> Hope I was more clear this time.. :)
> 
> Jeff
> 
> 
> 
> 
> > -----Original Message-----
> > From: Katz, Dov B (IT) [mailto:[EMAIL PROTECTED]
> > Sent: Monday, December 06, 2004 1:54 PM
> > To: CF-Talk
> > Subject: RE: Fixed Width variable question.
> >
> >
> > I think #numberFormat(num,"000000000")# should do the trick. -dbk
> >
> > -----Original Message-----
> > From: Jeff Waris [mailto:[EMAIL PROTECTED]
> > Sent: Monday, December 06, 2004 1:50 PM
> > To: CF-Talk
> > Subject: Fixed Width variable question.
> >
> > Does anyone have a good technique they use to make a "fixed
> > width" variable to insert into a text file?
> >
> > For example I have an order number, it can be 3,4,5 or 6
> > characters long
> >
> > Lets say:
> > 123
> > 1234
> > 12345
> > 123456
> >
> > ...and I need to format them at 9 characters long by
> > inserting 0's in the
> > beginning:
> > 000000123
> > 000001234
> > 000012345
> > 000123456
> >
> >
> > Thanks,
> > Jeff
> >
> >
> >
> >
> >
> 
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Special thanks to the CF Community Suite Silver Sponsor - New Atlanta
http://www.newatlanta.com

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:186338
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to