Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: Using a range of dates in yymmdd format

by ikegami (Patriarch)
on Aug 13, 2008 at 17:10 UTC ( [id://704139]=note: print w/replies, xml ) Need Help??


in reply to Using a range of dates in yymmdd format

If the module you're using to do your date arithmetic doesn't allow you to produce a formatted date, you can use the following statement:
my $date_string = sprintf('%02d%02d%02d', $year-1900, $month, $day);

Replies are listed 'Best First'.
Re^2: Using a range of dates in yymmdd format
by hawtin (Prior) on Aug 14, 2008 at 09:56 UTC

    Of course you meant:

    my $date_string = sprintf('%02d%02d%02d', $year%100, $month, $day);

    Which just illustrates why this is such a bad date format to use

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others meditating upon the Monastery: (4)
As of 2024-04-19 22:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found