Hi everyone,

Thank you very much for answering my question.

I was quite surprised that there is hidden treasure in Format routine.
I end up using Format('%.2d',[MyInt]) which is easiest to code.

Best Regards
Leigh

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Craig Goodall
Sent: Monday, July 28, 2003 11:20 AM
To: Multiple recipients of list delphi
Subject: Re: [DUG]: Integer conversion


Hi Leigh,

Does something like  ... Format('%.2d',[MyInt])   work?

Craig


Leigh Wanstead wrote:

>Hello everyone,
>
>I want to convert integer to string.
>
>Here is the rule
>
>Integer        String
>1              '01'
>2              '02'
>3              '03'
>4              '04'
>5              '05'
>6              '06'
>11             '11'
>12             '12'
>
>It convert int to string, if width less than 1, put '0' in front of String.
>
>I checked help file about format and can not find the right one I want.
>
>TIA
>
>Regards
>Leigh
>
>---------------------------------------------------------------------------
>    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                  Website: http://www.delphi.org.nz
>To UnSub, send email to: [EMAIL PROTECTED]
>with body of "unsubscribe delphi"
>Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/
>
>.
>
>
>

---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED]
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/


---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz
To UnSub, send email to: [EMAIL PROTECTED] 
with body of "unsubscribe delphi"
Web Archive at: http://www.mail-archive.com/delphi%40delphi.org.nz/

Reply via email to