Something like this before the original select should get the closest value:my $db1=$DB->table('Links');
$db1->select_options (ORDER BY Ausgabe DESC LIMIT 1);
my $cond1= GT::SQL::Condition->new('Ausgabe','<=',$ausgabe);
$ausgabe=$db1->select(['Ausgabe'],$cond)->fetchrow_array;
$db1->select_options (ORDER BY Ausgabe DESC LIMIT 1);
my $cond1= GT::SQL::Condition->new('Ausgabe','<=',$ausgabe);
$ausgabe=$db1->select(['Ausgabe'],$cond)->fetchrow_array;