Thanks so much again, kellner, for your excellent suggestions.
I still can't do a date range search.
Here are the changes I've made. I found all instances of &get_date(); and changed them to: &get_date(time()); I even did this in default.cfg so my Date field is:
'Date' => [19, 'alpha', 20, 255, 0, &get_date(time()), '']
(so yes it is Date, not date). One fix of the get_date did get rid of that 1969 date for today.
I changed get_computed_date to:
------------------------------
my ($time) = $_[0];
$year = substr($time,0,4);
$mon = substr($time,4,2);
$day = substr($time,6,2);
unless ($mon && $day && $year) {
return undef;
}
--$mon;
my (@months) = qw!01 02 03 04 05 06 07 08 09 10 11 12!;
return "$mon/$day/$year";
}
------------------------------
My What's New mod in db.cgi looks like this:
------------------------------
if($in{'listnew'}) {
$days = 8; # Number of days for What's New, +1.
$new = &get_date(time() - ($days * 86400));
# Change Date below to match the *exact* name of your date field.
$in{'Date-gt'} = $new;
# Change 2 below to match the number of your date field.
$in{'sb'} = 19; # Number of your date field
$in{'so'} = 'descend';
}
------------------------------
and the link to that in html.pl is like this:
print qq!| <a href="$db_script_link_url&listnew=1&view_records=1">Show last 7 Days</a> ! if ($per_view);
That link will still show all records from 2001, not just the last 7 days, and none in 2002.
My date range search box code is still the same, and still broken.