query_procedimientos.Close;
query_procedimientos.SQL.Clear;
query_procedimientos.SQL.Text := STRSQL;
query_procedimientos.Parameters.ParamByName('fechadesde').Value := FormatDateTime('yyyy-mm-dd', Fechadesde.date);
query_procedimientos.Parameters.ParamByName('fechahasta').Value := FormatDateTime('yyyy-mm-dd', fechahasta.date);
query_procedimientos.Open;