Code: Select all
DBQbsclliure.SQL.Clear;
DBQbsclliure.SQL.Add('select distinct(fecha) from doctores_agenda');
DBQbsclliure.SQL.Add('where codigo_doctor = :coddoc and fecha >= :fecha');
DBQbsclliure.SQL.Add('and hora > :hora1 and hora = "2005-03-23"
and hora > "00:01:00" and hora < "23:59:00" and nombre is null
order by fecha
hora is a time field, fecha is a date field.