in reply to Datetime Problem - Wrong Time
#!/usr/bin/perl use DateTime; $dt = DateTime->now(); $dt->subtract(months => 1); $year = $dt->year(); $month = $dt->strftime("%m"); print $dt."\n"; print $month."\n"; print $year."\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Datetime Problem - Wrong Time
by solarisfire (Novice) on Feb 07, 2012 at 15:10 UTC | |
by tobyink (Canon) on Feb 07, 2012 at 23:03 UTC |