Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: Date

by Anonymous Monk
on Mar 12, 2001 at 02:01 UTC ( #63670=note: print w/ replies, xml ) Need Help??


in reply to How to find yesterdays date (was: Date)

Thanks redcloud, thats great...

The month is printing out as 03 is there a way to change it to 3 ? Thanks.


Comment on Re: Date
Re: Re: Date
by redcloud (Parson) on Mar 12, 2001 at 04:26 UTC
    Yes, if you want to remove the leading zero, you can change the %02d in the sprintf command to %d. You probably need to look at whether you'll have to do this for the day, too. (And the %04d for the year was just overkill on my part, unless you've got files over 1001 years old. 8^P )

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://63670]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (12)
As of 2015-07-06 16:23 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (77 votes), past polls