Hi David,
you can use this following script for getting the date in yyyy-mm-dd format.
just use &date_format for passing this date format to the database.
#!/usr/bin/perl
####-----Create yyyy-mm-dd date format---####
print &date_format;
sub date_format{
($sec,$min,$hour,$wday,$month,$year,$mday)=localtime(time());
$month="0".$month if ($month)<10;
#make month in 2 digits if it is less than 2
$wday="0".$wday if ($wday)<10;
#make date in 2 digits if it is less than 2
$yr=substr($year,1);
$yr="20".$yr if length($yr)==2;
#make year in 4 digits
$date=$yr."-".$month."-".$wday;
#concatenate the date in yyyy-mm-dd format.
return $date;
}
------------------
SR -
shiju.dreamcenter.net
"The fear of the LORD is the beginning of knowledge..."