I have my database in Access and am unable to get it sucessfully in to Links SQL. This upsetting is going on since three months.
Can some one tell me how to get 01.01.99 to 1999-01-01 in the unix format.
I checked the Resources and also the other forums. But they all gives support on new date to unixdate. So what I need is
if ($table eq 'Links') {
if ($record{'Add_date'} !~ /^\d*$/) {
$record{'Add_date'} = &import_to_unixdate ($record{'Add_date'}) | | ($record{'Add_date'});
}
}
sub import_to_unixdate
my $unixdate = ($record{'Add_date'}) = shift;
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $unixdate;
$year = $year + 1900; $mon++;
($mon < 10) and ($mon = "0" . int $mon); ($day < 10) and ($day = "0" . int $day);
return "$year-$mon-$day";
}
Will this work? How do I pass the variable ($record{'Add_date'}) to the $unixdate and change the format as :
(Access date) 01.01.99 >> 1999-01-01 (Unix date)
[This message has been edited by rajani (edited October 30, 1999).]
Can some one tell me how to get 01.01.99 to 1999-01-01 in the unix format.
I checked the Resources and also the other forums. But they all gives support on new date to unixdate. So what I need is
if ($table eq 'Links') {
if ($record{'Add_date'} !~ /^\d*$/) {
$record{'Add_date'} = &import_to_unixdate ($record{'Add_date'}) | | ($record{'Add_date'});
}
}
sub import_to_unixdate
my $unixdate = ($record{'Add_date'}) = shift;
my ($sec, $min, $hour, $day, $mon, $year, $dweek, $dyear, $tz) = localtime $unixdate;
$year = $year + 1900; $mon++;
($mon < 10) and ($mon = "0" . int $mon); ($day < 10) and ($day = "0" . int $day);
return "$year-$mon-$day";
}
Will this work? How do I pass the variable ($record{'Add_date'}) to the $unixdate and change the format as :
(Access date) 01.01.99 >> 1999-01-01 (Unix date)
[This message has been edited by rajani (edited October 30, 1999).]