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:
Krambambuli
---
Taking care of that, the following code works:
Good luck,#!/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";
Krambambuli
---
|
---|
In Section
Seekers of Perl Wisdom