while running script i am getting below error:
Can't locate DateTime.pm in @INC (@INC contains: /usr/lib64/perl5/site_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl /usr/lib64/perl5/vendor_perl/5.8.8/x86_64-linux-thread-multi /usr/lib/perl5/ve
my code is :
#!/usr/bin/perl
use DBI;
use POSIX qw(strftime);
use DateTime;
my $dbh = DBI->connect(
"dbi:mysql:dbname=agilefant-test",
"agilefant-test",
"Agilefant-test",
{ RaiseError => 1 },
) or die $DBI::errstr;
my $datestring = strftime "%Y %m %d %X", gmtime;
my $fourteen_days_from_now = $datestring->add(days =>14);
my $sth = $dbh->prepare("Insert into backlogs (backlogtype, id, description, name, backlogSize, baselineLoad, endDate, readonlyToken, startDate, rank, status, parent_id)
values ('Project' , '200', 'Sanchit Testing', 'Maintenance agilefant', NULL, NULL, ('$fourteen_days_from_now'), NULL, ('$datestring'), NULL, NULL, '34')");
$sth->execute() or die $DBI::errstr;
$sth->finish();
As from previous questions it different coz i cant upgrade my system as i dont have rights and also and i want to set End Date as after 14 days from current date. So need help for that also.