I have the following SP which works ok but not between 00:00 and 23:59:59

CREATE PROCEDURE dbo.GetFechaVencimiento
@CantDiasDesde smallint,
@CantDiasHasta smallint
AS
DECLARE @datDesde datetime
DECLARE @datHasta datetime
SET NOCOUNT ON;
SET @datDesde=dateadd(day, @CantDiasDesde, getdate())
SET @datHasta=dateadd(day, @CantDiasHasta,getdate())
SELECT fchr,descr,mbox_env,fvenc FROM mer WHERE fvenc>=@datDesde and fvenc<=@datHasta ORDER BY fvenc
GO

This SP gets the date at the same time, thus not giving me any chance to get one record. This is why I need to conserve the date but not the time.

Hope this is clear to help me to figure this out,

Marcelo.