$beginDate = substr(DateCalc("today", "-7Days"),0,8);
This fetches the date 7 days back
Can I fetch the date before 7 years from todays date in Perl using same syntax
$beginDate = substr(DateCalc("today", "-7Days"),0,8);
This fetches the date 7 days back
Can I fetch the date before 7 years from todays date in Perl using same syntax
Where's the problem to try it out or read the documentation for DateCalc()
???
Check 'Add_Delta_YMD' function from Date::Calc module. Its simple to use. You may have to install it, though. Doesn't come bundled with default installation of perl.
Done with
$beginDate = substr(DateCalc("today", "-7Years"),0,8);