Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Convert Date formats

by Krambambuli (Curate)
on Feb 03, 2010 at 11:10 UTC ( #821125=note: print w/replies, xml ) Need Help??


in reply to Convert Date formats

If you want to stay with Date::Manip, you'll have to feed the parser with a valid date: 'NOV-07' is not a date, but a month (there is no day specified).

Taking care of that, the following code works:
#!/usr/bin/perl use strict; use warnings; use Date::Manip; my $thingy = 'NOV-2007'; my $date = UnixDate( ParseDate( "1-$thingy" ), '%Y/%m' ); print "$date\n";
Good luck,

Krambambuli
---

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://821125]
help
Chatterbox?
[erix]: I recognise the makings of a fine argument
[LanX]: lanx wonders ... how likely is it to talk >95% BS without intention?
[erix]: "gigantic amounts of data" is also not SQLite (imho)
talexb wonders why sqlite2 was deprecated in favour of sqlite3.
[erix]: looks like a fork, rather, no?
LanX /me /me
[erix]: /hehehe
[marto]: LanX yesterday I found out about Gish gallop tactic

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (14)
As of 2017-07-28 15:35 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    I came, I saw, I ...
























    Results (431 votes). Check out past polls.