Here's another option:
use Modern::Perl; use Date::Calc qw(Add_Delta_Days); say addDaysToDate( 20120516, 24 ); sub addDaysToDate { sprintf '%d%02d%02d', Add_Delta_Days( $_[0] =~ /(\d{4})(\d{2})(\d{2})/, $_[1] ); }
Output:
20120609
Hope this helps!
In reply to Re: Adding Days To YYYYMMDD Date Format
by Kenosis
in thread Adding Days To YYYYMMDD Date Format
by Zoomie
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |