The date can be imported into MySQL in MMDDYY format. You need to remove the ':' or change them to a '-'
In the import routine (if it's YY:MM D) then change the last subroutine to:
# ----------------------------------------------
my $in = shift;
my ($year, $mon, $day) = split /:/, $in;
# my %months = qw!Jan 01 Feb 02 Mar 03 Apr 04 May 05 Jun 06 Jul 07 Aug 08 Sep 09 Oct 10 Nov 11 Dec 12!;
# ($day < 10) and ($day = "0" . int $day);
return "$year-$months{$mon}-$day";
}
IF the access data is in any other format, move the $year, $mon and $day variables around to match the input pattern.
This is untested, but should work.
In the import routine (if it's YY:MM D) then change the last subroutine to:
Code:
sub convert_date { # ----------------------------------------------
my $in = shift;
my ($year, $mon, $day) = split /:/, $in;
# my %months = qw!Jan 01 Feb 02 Mar 03 Apr 04 May 05 Jun 06 Jul 07 Aug 08 Sep 09 Oct 10 Nov 11 Dec 12!;
# ($day < 10) and ($day = "0" . int $day);
return "$year-$months{$mon}-$day";
}
IF the access data is in any other format, move the $year, $mon and $day variables around to match the input pattern.
This is untested, but should work.