Number format

View: New views
2 Messages — Rating Filter:   Alert me  

Number format

by Maycon Sanches Amaro :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Guys

I need to format the exit this command:

set day=%date:~4,2% :: ->  03
set /a day2=%day%-1  ::-> 2

I need 02 and not 2.

Tks.

Maycon Sanches Amaro



Re: Number format

by foxidrive-7 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Tue, 03 Jun 2008 13:11:22 -0300, Maycon Sanches Amaro
<mayconsan@...> wrote:

>Guys
>
>I need to format the exit this command:
>
>set day=%date:~4,2% :: ->  03
>set /a day2=%day%-1  ::-> 2
>
>I need 02 and not 2.

if %day2% LSS 10 set day2=0%day2%

LightInTheBox - Buy quality products at wholesale price!