Agyeya has asked for the wisdom of the Perl Monks concerning the following question:
the date which comes into the record has 2020 as the year.#!/usr/bin/perl # get current Date from MySql use warnings; use strict; use DBI; use Date::Manip; my ($dbh, $rows); $dbh=DBI->connect('dbi:mysql:VISA','root','elephant') || die "Error opening database: $DBI::errstr\n"; my $date; #$date = DateCalc("today","+ 90 days"); $date=ParseDate("in 90 days"); print "Date: $date\n"; $rows=$dbh->do("INSERT INTO appCancel (appt_date,status, no_cancel, ci +ty) VALUES('$date' , 'U' , '0' , 'M')") || die "Couldn't insert record : $DBI::errstr"; $dbh->finish();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Date::Manip Help
by davido (Cardinal) on May 10, 2004 at 05:07 UTC | |
|
Re: Date::Manip Help
by Jaap (Curate) on May 10, 2004 at 06:41 UTC | |
|
Re: Date::Manip Help
by Zaxo (Archbishop) on May 10, 2004 at 07:35 UTC | |
|
Re: Date::Manip Help
by sacked (Hermit) on May 10, 2004 at 15:12 UTC | |
by Agyeya (Hermit) on May 11, 2004 at 05:56 UTC | |
by sacked (Hermit) on May 11, 2004 at 13:50 UTC | |
by Agyeya (Hermit) on May 12, 2004 at 04:38 UTC |