comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Zero filling
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Zero filling [message #66228] Tue, 28 April 2009 10:36
Jeff[2] is currently offline  Jeff[2]
Messages: 18
Registered: November 2007
Junior Member
On Apr 28, 12:01 pm, Maarten <maarten.sn...@knmi.nl> wrote:
> On Apr 28, 4:30 pm, Julio <julio.esque...@gmail.com> wrote:
>
>> Considering May, the routine returns me month = 5. Then a print it.
>> But I wish to print '05' and not '5'.
>
>> How can I insert this zero?
>
> print, format='(I02)', month
>
> Maarten

Thanks!!
Re: Zero filling [message #66229 is a reply to message #66228] Tue, 28 April 2009 08:01 Go to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Apr 28, 4:30 pm, Julio <julio.esque...@gmail.com> wrote:

> Considering May, the routine returns me month = 5. Then a print it.
> But I wish to print '05' and not '5'.
>
> How can I insert this zero?

print, format='(I02)', month

Maarten
Re: Zero filling [message #66230 is a reply to message #66229] Tue, 28 April 2009 07:55 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Julio wrote:
> Hello there... I have a very very simple question:
>
> I'm using JULDAY to compute the day, month and year from a Julian day
> variable.
>
> date = JULDAY(month, day, year)
>
> Considering May, the routine returns me month = 5. Then a print it.
> But I wish to print '05' and not '5'.
>
> How can I insert this zero?

IDL> month = 5
IDL> print, month
5
IDL> print, month, format='(i2.2)'
05
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Zero filling
Next Topic: i want to calculate how long since one file been modified. but i met some problem can u help me??

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:37:49 PDT 2025

Total time taken to generate the page: 0.00548 seconds