Subject Re: add leading zero to stuff number to 6 digits
From Keith <drkeithchan@gmail.com>
Date Sat, 21 Apr 2018 09:19:53 -0400
Newsgroups dbase.getting-started

Thx a lot
Keith

Mervyn Bick Wrote:

> On 2018-04-21 2:30 PM, Keith wrote:
> > Any function that I can use to expand number to 6 digits by addint leading zero.
> > Thx a lot!
> >
>
> You can add leading zeros to a number if it's digits are stored as
> characters.
>
> a = '6'
> a = right('000000'+a,6)
> ?a
>
> b = '13'
> b = right('000000'+b,6)
> ?b
>
> If the number is stored as a numeric value you can convert it to
> characters by using str().  See the help file for an explanation of the
> arguments which are passed to the function.
>
> c = 6
> c = str(c,6,0,'0')
> ?c
>
> d = 13
> d = str(d,6,0,'0')
> ?d
>
>
> Mervyn.



Warning: Unknown: write failed: No space left on device (28) in Unknown on line 0

Warning: Unknown: Failed to write session data (files). Please verify that the current setting of session.save_path is correct () in Unknown on line 0