« Return to Thread: Forcing leading zeros

RE: Forcing leading zeros

by VanBuskirk, Patricia :: Rate this Message:

Reply to Author | View in Thread

1) I may be looking at it wrong, but it seems that should be Right ( "0" & number ; 2 )??

2) It would be for an export file ... the people we are sending the file to need it to be, for example, "OTCWOCREATE_10192008_01.dat" with the current date in the middle (2-digit mo, 2-digit day, 4-digit year)

Thanks Lorne!


-----Original Message-----
From: fmpexperts-bounces@... [mailto:fmpexperts-bounces@...] On Behalf Of Lorne & Joan Walton
Sent: Wednesday, November 19, 2008 2:32 PM
To: fmpexperts@...
Subject: Re: Forcing leading zeros


On Nov 19, 2008, at 11:28 AM, VanBuskirk, Patricia wrote:

> 1) How do you force a field to be exactly two digits, ie. 01, 02,  
> 03 ...
> 48?

Make it a text field, Right ( number & "0" ; 2 )

> 2) How do you force Get( CurrentDate ) to have leading zeros in the
> month/day?

For display? Use the Format|Date menu.

--
Don't sweat the petty stuff. And don't pet the sweaty stuff.
 Lorne Walton, Maple Ridge, BC, Canada 

_______________________________________________
FMPexperts mailing list
FMPexperts@...
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au
_______________________________________________
FMPexperts mailing list
FMPexperts@...
http://lists.ironclad.net.au/listinfo.cgi/fmpexperts-ironclad.net.au

 « Return to Thread: Forcing leading zeros