Hi Stephen, Chris,

Thanks.

It works great by using the code Format('%2.2d',[IntValue]).

Regards
Leigh



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Behalf Of Stephen Bertram
Sent: Monday, July 28, 2003 10:51 AM
To: Multiple recipients of list delphi
Subject: RE: [DUG]: Integer conversion


try Format('%2.2d',[IntValue])

-----Original Message-----
From: Leigh Wanstead [mailto:[EMAIL PROTECTED]
Sent: Monday, 28 July 2003 10:49 a.m.
To: Multiple recipients of list delphi
Subject: [DUG]: Integer conversion


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/
Disclaimer : This communication contains information that is confidential
and the copyright of enSynergy Limited or a third party. If you are not the
intended recipient of this communication please delete and destroy all
copies and telephone enSynergy Limited on +64 9 9205441 immediately. If you
are the intended recipient of this communication you should not copy,
disclose or distribute this communication without the authority of enSynergy
Limited. Any views expressed in this Communication are those of the
individual sender, except where the sender specifically states them to be
the views of enSynergy Limited. Except as required by law, enSynergy Limited
does not represent, warrant and/or guarantee that the integrity of this
communication has been maintained nor that the communication is free of
errors, virus, interception or interference.

---------------------------------------------------------------------------
    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